Skeeve42
May 3rd, 2008, 05:33 PM
Boot Ubuntu Live CD from a USB Stick
I needed 4 days, but the solutiion is quite simple...
Here are the instructions, step by step.
But before that let me tell you that I'm German and so my english might be not as good as it could be. I also will drop some hints for the German readers, mostly because of our different keyboard layout. This is a free translation of my german instructions posted on apfeltalk.de (http://www.apfeltalk.de/forum/tut-ubuntu-live-t144587-p1387002.html#post1387002).
Information sources used
Where to download Ubuntu for PowerPC and other frequently asked questions (http://ubuntuforums.org/showthread.php?t=427714)
Instructions on help.ubuntu.com (https://help.ubuntu.com/6.10/ubuntu/installation-guid/powerpc/boot-usb-files.html)
Wie man mit Yaboot auf PowerPC bootet (http://penguinppc.org/bootloaders/yaboot/doc/yaboot-howto.shtml/index.de.shtml) (German)
Step 1: Get the data
Fetch an ISO image for a Live CD [1] (http://ubuntuforums.org/showthread.php?t=427714). Burn a CD(-RW) using the OS X Disk Utility.
You should format the USB Stick with a Name you can recognize.
Step 2: Boote the Live CD
UInsert the CD einlegen and reboot. At the Bootup sound press C to boot from CD.
A bit later the "boot: " Prompt will appear. I had to enter
live video=ofonly
in ordre to boot. My advise is to use
live-nosplash video=ofonly
Hint: The keyboard is set to US layout. German users will have to press the keys "liveßnosplash video´ofonlz".
Step 3: Creating the bootstrap-partition
Wenn Ubuntu is up, open the Terminal.
Now try to find the device name your USB stick currently has. So connect the USB stick now, if not already done.
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 775652 268 775384 1% /lib/modules/2.6.24-16-powerpc/volatile
tmpfs 775652 268 775384 1% /lib/modules/2.6.24-16-powerpc/volatile
varrun 775652 96 775556 1% /var/run
varlock 775652 0 775652 0% /var/lock
udev 775652 120 775532 1% /dev
devshm 775652 12 775640 1% /dev/shm
tmpfs 775652 16 775636 1% /tmp
/dev/sdc1 990156 12 990144 72% /media/BOOTSTICK
Here the device name is /dev/sdc. Note: The device name can be different after each boot. /dev/sdc in this instruction is to be replaced with the devicee name of your stick.
Now we have to switch to superuser
sudo -s
umount /dev/sdc1
Then we start partitioning using "mac-fdisk"
mac-fdisk /dev/sdc
/dev/sdc
Command (? for help):
Enter "i" for initialising the partition map.
Command (? for help): i
size of 'device' is 1980416 blocks:
new size of 'device' is 1980416 blocks
Review the map by entering "p"
Command (? for help): p
/dev/sdc
# type name length base ( size ) system
/dev/sdc1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/sdc2 Apple_Free Extra 1980352 @ 64 (967.0M) Free space
Block size=512, Number of Blocks=1980416
DeviceType=0x0, DeviceId=0x0
Now we crate the bootstrap-partition. Newer versions of mac-fdisk know the command "b" for this. If you have an older one you need to enter "C xxxx 800k bootstrap Apple_Bootstrap". The xxxx is to be replaced with the number of the start block, which is 64 in the map shown above.
Command (? for help): b
First block: 64
Command (? for help): p
/dev/sdc
# type name length base ( size ) system
/dev/sdc1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/sdc2 Apple_Bootstrap bootstrap 1600 @ 64 (800.0k) NewWorld bootblock
/dev/sdc3 Apple_Free Extra 1978752 @ 1664 (966.2M) Free space
Block size=512, Number of Blocks=1980416
DeviceType=0x0, DeviceId=0x0
This concludes the creation of the map and we have to write it to the stick.
Command (? for help): w
IMPORTANT: You are about to write a changed partition map to disk.
For any partition you changed the start or size of, writing out
the map causes all data on that partition to be LOST FOREVER.
Make sure you have a backup of any data on such partitions you
want to keep before answering 'yes' to the question below!
Write partition map? [n/y]: y
The partition map has been saved successfully!
Syncing disks.
Partition map written to disk. If any partitions on this disk
were still in use by the system (see messages above), you will need
to reboot in order to utilize the new partition map.
You leave mac-fdisk with "q".
Step 4: Filling the bootstrap-partition
Now you format the bootstrap-partition with hfs
hformat -l bootstrap /dev/sdc2
Volume name is "bootstrap"
Volume was created on Fri May 2 19:04:53 2008
Volume was last modified on Fri May 2 19:30:32 2008
Volume has 799744 bytes free
mount it
hmount /dev/sdc2
Volume name is "bootstrap"
Volume was created on Fri May 2 19:04:53 2008
Volume was last modified on Fri May 2 19:30:32 2008
Volume has 799744 bytes free
and copy yaboot onto it and set some attributes
.
hcopy -r /cdrom/install/yaboot :
hattrib -c UNIX -t tbxi :yaboot
hattrib -b :
humount
yaboot needs a configuration file. Fortunately we can use the one from the CD with just a small change
mount /dev/sdc2 /mnt
cp /cdrom/install/yaboot /mnt
We saw in the partition map that there is a partition 3. We will copy the live CD onto that partition. We have to inform yaboot about the fact that the system resides on partition 3.
vi /mnt/yaboot.conf
You will find information about yaboot.conf's structure on the internet. For now it's just important thatwe put the partition number near the top of the file. For example in the line directly after "timeout=300". For this, move the cursor into that line and press enter to activate the insert mode of vi. Then type
partition=3
after that press the escape key to leave the insert mode.
Note: Here you can add severeal settings you like the system to always use. For example your locale or your keyboard layout. This example is for a German locale with german keyboard. Also added is the (mandatory?) video=ofonly:
Please type in vi:
:1,$ s/ --"/ locale=de_DE bootkbd=de console-setup\/layoutcode=de video=ofonly --"/
You might also want to cnhange the "default=live" to "default=live-nosplash".
When done, the changed file need to be saved:
:wq!
Now we can unmount the partition
umount /dev/sdc2
Step 5: Copy the CD
First we need to format Partition 3:
mkfs -t ext3 /dev/sdc3
mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
61952 inodes, 247344 blocks
12367 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=255852544
8 block groups
32768 blocks per group, 32768 fragments per group
7744 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Writing inode tables: 0/81/82/83/84/85/86/87/8done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
and mount it:
mount /dev/sdc3 /mnt
To copy the files I usually use this command sequence I'm usin since the last millenium ;-)
(cd /cdrom ; tarcBpf -.) | (cd /mnt ; tar xvBpf -)
./
./README.diskdefines
./.disk/
./.disk/casper-uuid-powerpc
./.disk/casper-uuid-powerpc64-smp
./.disk/info
./.disk/release_notes_url
./casper/
./casper/filesystem.manifest
./casper/filesystem.manifest-desktop
[...]
./ppc/bootinfo.txt
./preseed/
./preseed/cli.seed
./preseed/ltsp.seed
./preseed/ubuntu.seed
./ubuntu
This will last some time, but when done, we can unmount the partition
umount /dev/sdc3
and now we can boot from the stick!
Step 6: Boot from the stick
reboot
Sooner or later the CD will be ejected. Press enter then. When you hear the boot sound press the 4 keys: alt-cmd-o-f. Soon after that, the Open Firmware prompt should appear.
First we try to find the bootstick:
dev / ls
Hint: US keyboard! Germans pleas press "/" to get the "-".
You will see a longish hierachical list.
Somewhere in that list you will find a "/usb..." and somewhere below that a "/disk...". Maybe a "/hub..." is between that, should the stick be plugged into a usb hub.
It's important to write down that part.
/usb@15,1
:
:
/disk@1
With the command
devalias
we look whether or not there is a "shortcut" for the /usb@15:
Here is what my system has:
usb1 /pci@f2000000/@15,1
To boot from the stick, I enter:
boot usb1/disk@1:2,\\:tbxi
the :2 is the bootstrap-partition we created earlier.
That was it. After some time yaboot's "boot: " prompt should appear. Depending on the changes you made to yaboot.conf, you simply press enter or select the appropriate image to boot.
I needed 4 days, but the solutiion is quite simple...
Here are the instructions, step by step.
But before that let me tell you that I'm German and so my english might be not as good as it could be. I also will drop some hints for the German readers, mostly because of our different keyboard layout. This is a free translation of my german instructions posted on apfeltalk.de (http://www.apfeltalk.de/forum/tut-ubuntu-live-t144587-p1387002.html#post1387002).
Information sources used
Where to download Ubuntu for PowerPC and other frequently asked questions (http://ubuntuforums.org/showthread.php?t=427714)
Instructions on help.ubuntu.com (https://help.ubuntu.com/6.10/ubuntu/installation-guid/powerpc/boot-usb-files.html)
Wie man mit Yaboot auf PowerPC bootet (http://penguinppc.org/bootloaders/yaboot/doc/yaboot-howto.shtml/index.de.shtml) (German)
Step 1: Get the data
Fetch an ISO image for a Live CD [1] (http://ubuntuforums.org/showthread.php?t=427714). Burn a CD(-RW) using the OS X Disk Utility.
You should format the USB Stick with a Name you can recognize.
Step 2: Boote the Live CD
UInsert the CD einlegen and reboot. At the Bootup sound press C to boot from CD.
A bit later the "boot: " Prompt will appear. I had to enter
live video=ofonly
in ordre to boot. My advise is to use
live-nosplash video=ofonly
Hint: The keyboard is set to US layout. German users will have to press the keys "liveßnosplash video´ofonlz".
Step 3: Creating the bootstrap-partition
Wenn Ubuntu is up, open the Terminal.
Now try to find the device name your USB stick currently has. So connect the USB stick now, if not already done.
df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 775652 268 775384 1% /lib/modules/2.6.24-16-powerpc/volatile
tmpfs 775652 268 775384 1% /lib/modules/2.6.24-16-powerpc/volatile
varrun 775652 96 775556 1% /var/run
varlock 775652 0 775652 0% /var/lock
udev 775652 120 775532 1% /dev
devshm 775652 12 775640 1% /dev/shm
tmpfs 775652 16 775636 1% /tmp
/dev/sdc1 990156 12 990144 72% /media/BOOTSTICK
Here the device name is /dev/sdc. Note: The device name can be different after each boot. /dev/sdc in this instruction is to be replaced with the devicee name of your stick.
Now we have to switch to superuser
sudo -s
umount /dev/sdc1
Then we start partitioning using "mac-fdisk"
mac-fdisk /dev/sdc
/dev/sdc
Command (? for help):
Enter "i" for initialising the partition map.
Command (? for help): i
size of 'device' is 1980416 blocks:
new size of 'device' is 1980416 blocks
Review the map by entering "p"
Command (? for help): p
/dev/sdc
# type name length base ( size ) system
/dev/sdc1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/sdc2 Apple_Free Extra 1980352 @ 64 (967.0M) Free space
Block size=512, Number of Blocks=1980416
DeviceType=0x0, DeviceId=0x0
Now we crate the bootstrap-partition. Newer versions of mac-fdisk know the command "b" for this. If you have an older one you need to enter "C xxxx 800k bootstrap Apple_Bootstrap". The xxxx is to be replaced with the number of the start block, which is 64 in the map shown above.
Command (? for help): b
First block: 64
Command (? for help): p
/dev/sdc
# type name length base ( size ) system
/dev/sdc1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/sdc2 Apple_Bootstrap bootstrap 1600 @ 64 (800.0k) NewWorld bootblock
/dev/sdc3 Apple_Free Extra 1978752 @ 1664 (966.2M) Free space
Block size=512, Number of Blocks=1980416
DeviceType=0x0, DeviceId=0x0
This concludes the creation of the map and we have to write it to the stick.
Command (? for help): w
IMPORTANT: You are about to write a changed partition map to disk.
For any partition you changed the start or size of, writing out
the map causes all data on that partition to be LOST FOREVER.
Make sure you have a backup of any data on such partitions you
want to keep before answering 'yes' to the question below!
Write partition map? [n/y]: y
The partition map has been saved successfully!
Syncing disks.
Partition map written to disk. If any partitions on this disk
were still in use by the system (see messages above), you will need
to reboot in order to utilize the new partition map.
You leave mac-fdisk with "q".
Step 4: Filling the bootstrap-partition
Now you format the bootstrap-partition with hfs
hformat -l bootstrap /dev/sdc2
Volume name is "bootstrap"
Volume was created on Fri May 2 19:04:53 2008
Volume was last modified on Fri May 2 19:30:32 2008
Volume has 799744 bytes free
mount it
hmount /dev/sdc2
Volume name is "bootstrap"
Volume was created on Fri May 2 19:04:53 2008
Volume was last modified on Fri May 2 19:30:32 2008
Volume has 799744 bytes free
and copy yaboot onto it and set some attributes
.
hcopy -r /cdrom/install/yaboot :
hattrib -c UNIX -t tbxi :yaboot
hattrib -b :
humount
yaboot needs a configuration file. Fortunately we can use the one from the CD with just a small change
mount /dev/sdc2 /mnt
cp /cdrom/install/yaboot /mnt
We saw in the partition map that there is a partition 3. We will copy the live CD onto that partition. We have to inform yaboot about the fact that the system resides on partition 3.
vi /mnt/yaboot.conf
You will find information about yaboot.conf's structure on the internet. For now it's just important thatwe put the partition number near the top of the file. For example in the line directly after "timeout=300". For this, move the cursor into that line and press enter to activate the insert mode of vi. Then type
partition=3
after that press the escape key to leave the insert mode.
Note: Here you can add severeal settings you like the system to always use. For example your locale or your keyboard layout. This example is for a German locale with german keyboard. Also added is the (mandatory?) video=ofonly:
Please type in vi:
:1,$ s/ --"/ locale=de_DE bootkbd=de console-setup\/layoutcode=de video=ofonly --"/
You might also want to cnhange the "default=live" to "default=live-nosplash".
When done, the changed file need to be saved:
:wq!
Now we can unmount the partition
umount /dev/sdc2
Step 5: Copy the CD
First we need to format Partition 3:
mkfs -t ext3 /dev/sdc3
mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
61952 inodes, 247344 blocks
12367 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=255852544
8 block groups
32768 blocks per group, 32768 fragments per group
7744 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Writing inode tables: 0/81/82/83/84/85/86/87/8done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
and mount it:
mount /dev/sdc3 /mnt
To copy the files I usually use this command sequence I'm usin since the last millenium ;-)
(cd /cdrom ; tarcBpf -.) | (cd /mnt ; tar xvBpf -)
./
./README.diskdefines
./.disk/
./.disk/casper-uuid-powerpc
./.disk/casper-uuid-powerpc64-smp
./.disk/info
./.disk/release_notes_url
./casper/
./casper/filesystem.manifest
./casper/filesystem.manifest-desktop
[...]
./ppc/bootinfo.txt
./preseed/
./preseed/cli.seed
./preseed/ltsp.seed
./preseed/ubuntu.seed
./ubuntu
This will last some time, but when done, we can unmount the partition
umount /dev/sdc3
and now we can boot from the stick!
Step 6: Boot from the stick
reboot
Sooner or later the CD will be ejected. Press enter then. When you hear the boot sound press the 4 keys: alt-cmd-o-f. Soon after that, the Open Firmware prompt should appear.
First we try to find the bootstick:
dev / ls
Hint: US keyboard! Germans pleas press "/" to get the "-".
You will see a longish hierachical list.
Somewhere in that list you will find a "/usb..." and somewhere below that a "/disk...". Maybe a "/hub..." is between that, should the stick be plugged into a usb hub.
It's important to write down that part.
/usb@15,1
:
:
/disk@1
With the command
devalias
we look whether or not there is a "shortcut" for the /usb@15:
Here is what my system has:
usb1 /pci@f2000000/@15,1
To boot from the stick, I enter:
boot usb1/disk@1:2,\\:tbxi
the :2 is the bootstrap-partition we created earlier.
That was it. After some time yaboot's "boot: " prompt should appear. Depending on the changes you made to yaboot.conf, you simply press enter or select the appropriate image to boot.