Booting from USB device or tftp server

Linux only discussion for the AmigaOne 500 and Sam series
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Booting from USB device

Post by Spectre660 »

Hey thanks for that.

Using my Sam460ex I downloaded the 2GB image, decompressed with 7za and wrote with rawdisk then booted linux in text mode from the USB thumb drive with no problems .
Seem to have to use MediaToolbox to Install the USB thumbdrive before the rawdisk copy .

rawdisk from Data:Downloads/Amigaone_Ubuntu_16.04-Base-1.img to usb0:
javierdlr wrote:I used 7za tool/command (don't kno where I got it) and it decompressed fine. Will try to find where to that 7za for AmigaOS.

...

maybe from http://amiga.sourceforge.net/?showpackage=p7zip
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Booting from USB device

Post by Spectre660 »

I have encountered problems booting both AmigaOS4.1 and Linux with an EXT4 partition on my hard drive so have removed ub2lb as the bootloader and gone back to slb_v2.
ub2lb gets stuck and won't load the boot menu due to the EXT4 partition.
I now boot the kernel from USB thumb drive .
The new Uboot variables set from AmigaOS 4.1 are ( the example is with a root partition as the 8th partion on the hard drive so /dev/sdb8)

Code: Select all

nvsetvar bootargs="console ttys0,115200 console=tty1 root=/dev/sda8"
nvsetvar lb1="ext2load usb 0:3 1000000 uImage-460;ext2load usb 0:3 2000000 sam460.dtb;bootm 1000000 - 2000000"
nvsetvar bootargs_usb="setenv bootargs 'console ttys0,115200 console=tty1 root=/dev/sdb2 rootdelay=10' "
nvsetvar lb2="run bootargs_usb;run lb1"
To get to uboot command prompt quickly at boot hold down the escape key
From the uboot command prompt

To use the hard drive partition /dev/sdb8 as root

Code: Select all

run lb1
To use the usb drive partition /dev/sdb2 as root

Code: Select all

run lb2
The kernel is stored on the /dev/sdb3 partition of the usb thumb drive with the name uImage-460.
The partition type is EXT2 and you have to be root to copy on to this partition from Linux .
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Booting from USB device or tftp server

Post by Spectre660 »

Sam460 Kernel booting options evolving.
from USB or tftp server (by far the fastest method)

Code: Select all

; This file can be executed from AmigaOS 4.x to get the Uboot variables correct using the excute command.
; If the onboard SATA is active then the hard drive attached is /dev/sda and first hard drive attached to a sii pci SATA card is /dev/sdb with the first USB device being /dev/sdc.
; if the onboard SATA is deactivated or not present as in the case of the Sam460cr, the the first hard drive attached to the sii pci SATA card is /dev/sda with the first USB device being /dev/sdb.
; change devices for the SATA drive and the USB thumb drive to match your configuration in the nvgetvar lines below then execute this script.
;The examples  below uses /dev/sda6 which is the 6th partition on the first hard drive drive connected.
 ;The USB thumb drive partion is normally going to be the second partition of the first attached usb storage device. in this case /dev/sdb2 . 

; To boot Linux from a Linux partition on a USB thumb drive from the U-Boot shell use 
;run lb2
;To boot Linux  from a hard drive partition from the U-boot shell use
;run lb1
;To boot from tftp server (Fastest boot option)
; run lb3
; the  following ip addresses need to be set for tftp with the correct addresses for your server and you Sam460 
;nvsetvar serverip=192.168.1.14
;nvsetvar ipaddr=192.168.1.13

nvsetvar bootargs="root=/dev/sda6 console=ttyS0,115200 console=tty0"
nvsetvar ub="setenv bootargs 'root=/dev/sdb2 rootdelay=10 console=ttyS0,115200 console=tty0' "
nvsetvar lb1="ext2load usb 0:3 1000000 uImage-460;ext2load usb 0:3 2000000 sam460.dtb;bootm 1000000 - 2000000"
nvsetvar lb2="run ub ;run lb1"
nvsetvar lb3="tftp 1000000 uImage-460;tftp 2000000 sam460.dtb;bootm 1000000 - 2000000"
Last edited by Spectre660 on Mon May 16, 2016 2:54 pm, edited 2 times in total.
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Booting from USB device or tftp server

Post by Spectre660 »

Updated Sam460ex info .

Code: Select all

; This file can be executed from AmigaOS 4.x to get the Uboot variables correct using the excute command.
; If the onboard SATA is active then the hard drive attached is /dev/sda and first hard drive attached to a sii pci SATA card is /dev/sdb with the first USB device being /dev/sdc.
; if the onboard SATA is deactivated or not present as in the case of the Sam460cr, the the first hard drive attached to the sii pci SATA card is /dev/sda with the first USB device being /dev/sdb.
; change devices for the SATA drive and the USB thumb drive to match your configuration in the nvgetvar lines below then execute this script.
;The examples  below uses /dev/sda6 which is the 6th partition on the first hard drive drive connected.
 ;The USB thumb drive partion is normally going to be the second partition of the first attached usb storage device. in this case /dev/sdb2 . 

; To boot Linux from a Linux partition on a USB thumb drive from the U-Boot shell use 
;run lb2
;To boot Linux  from a hard drive partition from the U-boot shell use
;run lb1
;To boot from tftp server (Fastest boot option)
; run lb3
; the  following ip addresses need to be set for tftp with the correct addresses for your server and your Sam460 
;nvsetvar serverip=192.168.1.14
;nvsetvar ipaddr=192.168.1.13

nvsetvar uimage="uImage-460"
nvsetvar dtb="sam460.dtb"

nvsetvar bootargs="root=/dev/sdb6 console=ttyS0,115200 console=tty0"
nvsetvar ub="setenv bootargs 'root=/dev/sdc2 rootdelay=10 console=ttyS0,115200 console=tty0' "
nvsetvar lb1="ext2load usb 0:3 1000000 ${uimage};ext2load usb 0:3 2000000 ${dtb};bootm 1000000 - 2000000"
;nvsetvar lb2="run ub ;run lb1"
nvsetvar lb2="run ub ;run lb3"
nvsetvar lb3="tftp 1000000 ${uimage};tftp 2000000 ${dtb};bootm 1000000 - 2000000"
Last edited by Spectre660 on Mon May 16, 2016 2:52 pm, edited 1 time in total.
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Booting from USB device or tftp server

Post by Spectre660 »

Sam44oep info .

Code: Select all

; This file can be executed from AmigaOS 4.x to get the Uboot variables correct using the excute command.
;The the first hard drive attached to the onboard sii  SATA is /dev/sda with the first USB device being /dev/sdb.
; change devices for the SATA drive and the USB thumb drive to match your configuration in the nvgetvar lines below then execute this script.
;The examples  below uses /dev/sda6 which is the 6th partition on the first hard drive drive connected.
 ;The USB thumb drive partion is normally going to be the second partition of the first attached usb storage device. in this case /dev/sdb2 . 

; To boot Linux from a Linux partition on a USB thumb drive from the U-Boot shell use 
;run lb2
;To boot Linux  from a hard drive partition from the U-boot shell use
;run lb1
;To boot from tftp server (Fastest boot option)
; run lb3
; the  following ip addresses need to be set for tftp with the correct addresses for your server and your Sam440ep 
;nvsetvar serverip=192.168.1.14
;nvsetvar ipaddr=192.168.1.13

nvsetvar uimage="cuImage-440"

nvsetvar bootargs="root=/dev/sda6 console=ttyS0,115200 console=tty0"
nvsetvar ub="setenv bootargs 'root=/dev/sdb2 rootdelay=10 console=ttyS0,115200 console=tty0' "
nvsetvar lb1="ext2load usb 0:3 500000 ${uimage};bootm 500000"
nvsetvar lb2="run ub ;run lb1"
nvsetvar lb3="tftp 500000 ${uimage};bootm 500000"
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Booting from USB device or tftp server

Post by Spectre660 »

Short video showing the speed of booting a linux kernel via tftp on Sam460ex
.
https://www.dropbox.com/s/ngiwdaq24i9ox ... t.avi?dl=0
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
User avatar
javierdlr
Beta Tester
Beta Tester
Posts: 389
Joined: Sun Jun 19, 2011 10:13 pm
Location: Donostia (GUIPUZCOA) - Spain
Contact:

Re: Booting from USB device or tftp server

Post by javierdlr »

Spectre660 wrote:Updated Sam460ex info .

Code: Select all

...
; the  following ip addresses need to be set for tftp with the correct addresses for your server and your Sam460 
;nvsetvar serverip=192.168.1.200
;nvsetvar ipaddr=192.168.1.201

nvsetvar uimage="uImage-460-4.6.2"
nvsetvar dtb="sam460.dtb"

nvsetvar bootargs="root=/dev/sdb12 console=ttyS0,115200 console=tty0"
...
nvsetvar lb3="tftp 1000000 ${uimage};tftp 2000000 ${dtb};bootm 1000000 - 2000000"
Used TFTPD (using vmware and a very plain/simple linux distro with tftpd-hpa) to load kernel 4.6.2 and worked fine and faaaaaast. Now I just have to remember what usr/psw do I have on my Ubuntu installation ¿:-/
...
Got it!!! (my usr/psw) GREAT :-)

Code: Select all

...:~$ uname -a
Linux Sam460ex 4.6.2-sam460ex-jm #1 PREEMPT Wed Jun 8 08:11:57 AST 2016 ppc ppc ppc GNU/Linux
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Booting from USB device or tftp server

Post by Spectre660 »

Updated AmigaOS Boot Script for normal booting .

Code: Select all

;Sam460ex  Uboot settings for Linux booting via uboot shell

;Script by Julian Margetson (Spectre660)

; This file can be executed from AmigaOS 4.x to get the Uboot variables correct using the excute command.
; If the onboard SATA is active then the hard drive attached is /dev/sda and first hard drive attached to a sii pci SATA card is /dev/sdb with the first USB device being /dev/sdc.
; if the onboard SATA is deactivated or not present as in the case of the Sam460cr, the the first hard drive attached to the sii pci SATA card is /dev/sda with the first USB device being /dev/sdb.
; change devices for the SATA drive and the USB thumb drive to match your configuration in the nvgetvar lines below then execute this script.
;The examples  below uses /dev/sda6 which is the 6th partition on the first hard drive drive connected.
 ;The USB thumb drive partion is normally going to be the second partition of the first attached usb storage device. in this case /dev/sdb2 . 

; To boot the Linux kernel and dtb from a USB  drive and boot a Linux partition on a USB thumb drive from the U-Boot shell use 
;run usb1

; To boot the Linux kernel and dtb from a tftp server and boot a Linux partition on a USB thumb drive from the U-Boot shell use 
;run usb2

;To boot the Linux kernel and dtb from a USB Drive and boot a Linux partition on a hard drive partition from the U-boot shell use
;run usb

;To boot the Linux kernel and dtb from a tftp server and boot a Linux on a hard drive partition (Fastest boot option) use
; run lan


; removes the variables used for installing Linux as there is a limit to the number of variables that
;can be defined at a given time 

nvsetvar ub1=""
nvsetvar ub2=""
nvsetvar ur=""
nvsetvar rl=""

; the  following ip addresses need to be set for tftp with the correct addresses for your server and your Sam460 

;TFTP Server ip address
nvsetvar serverip=192.168.1.14
;nvsetvar serverip=192.168.1.10

;Sam460 ip address
nvsetvar ipaddr=192.168.1.15

;uImage name
nvsetvar ui="uImage-460"

;dtb name
nvsetvar dt="sam460.dtb"

;kernel load address
nvsetvar kl="1000000"

;dtb load address
nvsetvar dl="2000000"

nvsetvar bootargs="root=/dev/sda6 console=ttyS0,115200 console=tty0 splash"
nvsetvar ub="setenv bootargs 'root=/dev/sdb2 rootdelay=10 console=ttyS0,115200 console=tty0  splash' "
nvsetvar usb="ext2load usb 0:3 ${kl} ${ui};ext2load usb 0:3 ${dl} ${dt};bootm ${kl} - ${dl}"
nvsetvar usb1="run ub ;run usb"
nvsetvar usb2="run ub ;run lan"
nvsetvar lan="tftp ${kl} ${ui};tftp ${dl} ${dt};bootm ${kl} - ${dl}"
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Booting from USB device or tftp server

Post by Spectre660 »

AmigaOS Bootscript for booting live DVD .

Code: Select all

;Sam460ex  Uboot settings for Linux booting via uboot shell

;Script by Julian Margetson (Spectre660)

; This file can be executed from AmigaOS 4.x to get the Uboot variables correct using the excute command.


; To boot the Linux Kernel and Ramdisk Installer from a Linux partition on a USB thumb drive from the U-Boot shell use 
;run usb
;the example below assumes booting from the second partition of the USB thumbdrive

;To boot the Linux Kernel and Ramdisk installer from tftp server (Fastest boot option)
; run Lan

; removes the variables used for regular Linux booting as there is a limit to the number of variables that can be defined at a given time 

nvsetvar usb1=""
nvsetvar usb2=""
nvsetvar ub=""

; the  following ip addresses need to be set for tftp with the correct addresses for your server and your Sam460 

;TFTP Server ip address
nvsetvar serverip=192.168.1.14

;Sam460 ip address
nvsetvar ipaddr=192.168.1.15

;uImage name
nvsetvar ui="uImage-460"

;dtb name
nvsetvar dt="sam460.dtb"

;ramdisk name
nvsetvar ur="uRamdisk"

;kernel load address
nvsetvar kl="1000000"

;dtb load address
nvsetvar dl="2000000"

;ramdisk load address
nvsetvar rl="3000000"

;Boot DVD
nvsetvar bootargs="root=/dev/ramdisk file=/cdrom/preseed/ubuntu-mate.seed boot=casper quiet ro splash"

;Boot USB  
;nvsetvar bootargs="root=/dev/ramdisk file=/dev/sdc/preseed/ubuntu-mate.seed boot=casper quiet ro splash --rootdelay=10 fb=false"

;Linux kernel and Uramdisk located on the 3rd partition of the USB thumbdrive
; partition must be in ext2 format

nvsetvar ub1="ext2load usb 0:3 ${kl} ${ui};ext2load usb 0:3 ${dl} ${dt}"
nvsetvar ub2="ext2load usb 0:3 ${rl} ${ur};bootm ${kl} ${rl} ${dl}"
nvsetvar usb="run  ub1;run ub2"
nvsetvar lan="tftp ${kl} ${ui};tftp ${dl} ${dt};tftp ${rl} uRamdisk;bootm ${kl} ${rl} ${dl}"
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Booting from USB device or tftp server

Post by Spectre660 »

Updated Scripts.

For Regular Booting

Code: Select all

;Sam460ex  Uboot settings for Linux booting via uboot shell

;Script by Julian Margetson (Spectre660)

; This file can be executed from AmigaOS 4.x to get the Uboot variables correct using the excute command.

;To enter  the U-Boot  shell press the Escape key while the Sam460ex boots

; If the onboard SATA is active then the hard drive attached is /dev/sda and first hard drive attached to a
sii pci SATA card is /dev/sdb with the first USB device being /dev/sdc.
; if the onboard SATA is deactivated or not present as in the case of the Sam460cr, the the first hard drive
attached to the sii pci SATA card is /dev/sda with the first USB device being /dev/sdb.
; change devices for the SATA drive and the USB thumb drive to match your configuration in the nvgetvar
lines below then execute this script.
;The examples  below uses /dev/sda6 which is the 6th partition on the first hard drive drive connected.
 ;The USB thumb drive partion is normally going to be the second partition of the first attached usb storage
device. in this case /dev/sdb2 . 


;To boot the Linux kernel and dtb from a USB Drive and boot a Linux partition on a hard drive partition from
the U-boot shell use
;run usb

;To boot the Linux kernel and dtb from a tftp server and boot a Linux on a hard drive partition (Fastest
boot option) use
; run lan


; removes the variables used for installing Linux as there is a limit to the number of variables that
;can be defined at a given time 

nvsetvar ub1=""
nvsetvar ub2=""
nvsetvar live=""

;set the  variables needed 

; the  following ip addresses need to be set for tftp with the correct addresses for your server and your
Sam460 

;TFTP Server ip address
nvsetvar serverip=192.168.1.14

;Sam460 ip address
nvsetvar ipaddr=192.168.1.15

;kernel name
nvsetvar ui="uImage-460"

;dtb file name
nvsetvar dt="sam460.dtb"

;ramdisk name
nvsetvar ur="uRamdisk"

;kernel load address
nvsetvar kl="1000000"

;dtb load address
nvsetvar dl="2000000"

;ramdisk load address
nvsetvar rl="3000000"

;USB partition with kernel,dtb and ramdisk . in this case the third partition of the first USB drive.
Partition must be in ext2 format
nvsetvar pt="usb 0:3"

;Boot args   
nvsetvar bootargs="root=/dev/sda6 console=ttyS0,115200 console=tty0 splash --"

;Variable to load kernel and dtb file from USB drive
nvsetvar usb="ext2load ${pt} ${kl} ${ui};ext2load ${pt} ${dl} ${dt};bootm ${kl} - ${dl}"

;Variable to load kernel and dtb file from TFTP server
nvsetvar lan="tftp ${kl} ${ui};tftp ${dl} ${dt};bootm ${kl} - ${dl}"

For Live DVD or Live USB booting

Code: Select all

;Sam460ex  Uboot settings for Linux booting via uboot shell

;Script by Julian Margetson (Spectre660)

; This file can be executed from AmigaOS 4.x to get the Uboot variables correct using the excute command.

;To enter  the U-Boot  shell press the Escape key while the Sam460ex boots

; To boot the Linux Kernel and Ramdisk Installer and ubuntu Live image from a Linux partition on a USB thumb
drive from the U-Boot shell use 
;run live

; remove the variables used for regular Linux booting as there is a limit to the number of variables that
can be defined at a given time 

nvsetvar usb=""
nvsetvar lan=""

;set the  variables needed 

;kernel name
nvsetvar ui="uImage-460"

;dtb file  name
nvsetvar dt="sam460.dtb"

;ramdisk name
nvsetvar ur="uRamdisk"

;kernel load address
nvsetvar kl="1000000"

;dtb load address
nvsetvar dl="2000000"

;ramdisk load address
nvsetvar rl="3000000"

;USB partition with kernel,dtb and ramdisk . in this case the third partition of the first USB drive.
Partition must be in ext2 format
nvsetvar pt="usb 0:3"

;Boot args option for Live DVD
;nvsetvar bootargs="root=/dev/ramdisk file=/cdrom/preseed/ubuntu-mate.seed boot=casper quiet ro splash --"

;Boot args  option for Live USB 
nvsetvar bootargs="root=/dev/ramdisk file=/dev/sdc/preseed/ubuntu-mate.seed boot=casper quiet ro splash --
rootdelay=10"

;Variable to load kernel and dtb file
nvsetvar ub1="ext2load ${pt} ${kl} ${ui};ext2load ${pt} ${dl} ${dt}"

;Variable to load URamdisk and boot every thing
nvsetvar ub2="ext2load ${pt} ${rl} ${ur};bootm ${kl} ${rl} ${dl}"

;execute the two previous lines
nvsetvar live="run  ub1;run ub2"
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
Post Reply