Fedora LiveUSB (LiveCD war gestern)
September 22nd, 2007 — red_alertFedora 8 Test 2 hat mich dazu veranlasst, endlich einmal heraus zu finden, wie man ein LiveUSB-Medium macht. Okay, dass ich an der OpenExpo danach gefragt wurde, wie man ein Linux auf einem USB-Stick zum laufen bringt hat auch etwas dazu beigetragen.
Nach etwas erfolglosem googeln nach einer weitverbreiteten (am besten distributionsabhängigen) Vorgehensweise habe ich das FedoraProject Wiki durchsucht. Dabei bin ich auf einen von ThomasChung erstellten und gepflegten Eintrag gestossen, der zwischen Juni und Juli dieses Jahres entstanden ist. Ich hab die Anleitung sogleich ausprobiert und der LiveUSB-Stick funktioniert perfekt. Die Anleitung ist meiner Meinung nach noch etwas unübersichtlich – je nachdem auf welchem Stand der Stick zuvor war.
Nachfolgend ist das copy-paste aus meiner Konsole zu sehen. Ausgangslage: F7, USB-Stick ist /deb/sdb, das ISO von F8T2 (kann eigentlich ein beliebiges Fedora ISO sein, AFAIK) heisst Fedora-7.91-kde-Live-i686.iso.
$ sudo yum install livecd-tools
livna 100% |=========================| 2.1 kB 00:00
fedora 100% |=========================| 2.1 kB 00:00
updates 100% |=========================| 2.3 kB 00:00
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package livecd-tools.noarch 0:009-1.fc7 set to be updated
–> Processing Dependency: dosfstools >= 2.11-8 for package: livecd-tools
–> Processing Dependency: pykickstart for package: livecd-tools
–> Processing Dependency: syslinux for package: livecd-tools
–> Processing Dependency: squashfs-tools for package: livecd-tools
–> Running transaction check
—> Package syslinux.i386 0:3.36-4.fc7 set to be updated
–> Processing Dependency: mtools for package: syslinux
—> Package pykickstart.noarch 0:1.1.1-1.fc7 set to be updated
—> Package dosfstools.i386 0:2.11-8.fc7 set to be updated
—> Package squashfs-tools.i386 0:3.2-1 set to be updated
–> Running transaction check
—> Package mtools.i386 0:3.9.10-4.fc7 set to be updated
–> Processing Dependency: /bin/csh for package: mtools
–> Running transaction check
—> Package tcsh.i386 0:6.14-15 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
livecd-tools noarch 009-1.fc7 updates 35 k
Installing for dependencies:
dosfstools i386 2.11-8.fc7 fedora 71 k
mtools i386 3.9.10-4.fc7 fedora 210 k
pykickstart noarch 1.1.1-1.fc7 updates 182 k
squashfs-tools i386 3.2-1 fedora 82 k
syslinux i386 3.36-4.fc7 fedora 673 k
tcsh i386 6.14-15 fedora 462 k
Transaction Summary
=============================================================================
Install 7 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 1.7 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): squashfs-tools-3.2 100% |=========================| 82 kB 00:01
(2/7): dosfstools-2.11-8. 100% |=========================| 71 kB 00:00
(3/7): mtools-3.9.10-4.fc 100% |=========================| 210 kB 00:01
(4/7): livecd-tools-009-1 100% |=========================| 35 kB 00:00
(5/7): pykickstart-1.1.1- 100% |=========================| 182 kB 00:00
(6/7): tcsh-6.14-15.i386. 100% |=========================| 462 kB 00:02
(7/7): syslinux-3.36-4.fc 100% |=========================| 673 kB 00:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: squashfs-tools ######################### [1/7]
Installing: dosfstools ######################### [2/7]
Installing: pykickstart ######################### [3/7]
Installing: tcsh ######################### [4/7]
Installing: mtools ######################### [5/7]
Installing: syslinux ######################### [6/7]
Installing: livecd-tools ######################### [7/7]
Installed: livecd-tools.noarch 0:009-1.fc7
Dependency Installed: dosfstools.i386 0:2.11-8.fc7 mtools.i386 0:3.9.10-4.fc7 pykickstart.noarch 0:1.1.1-1.fc7 squashfs-tools.i386 0:3.2-1 syslinux.i386 0:3.36-4.fc7 tcsh.i386 0:6.14-15
Complete!
$ sudo /sbin/fdisk /dev/sdb
Command (m for help): p
Disk /dev/sdb: 2055 MB, 2055208960 bytes
255 heads, 63 sectors/track, 249 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 249 2000061 83 Linux
Command (m for help): d
Selected partition 1
Command (m for help): d
No partition is defined yet!
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-249, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-249, default 249):
Using default value 249
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 6
Changed system type of partition 1 to 6 (FAT16)
Command (m for help): a
Partition number (1-4): 1
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
$ sudo /sbin/mkdosfs -n usbdisk /dev/sdb1
mkdosfs 2.11 (12 Mar 2005)
$ sudo livecd-iso-to-disk Fedora-7.91-kde-Live-i686.iso /dev/sdb1
Copying live image to USB stick
Updating boot config file
Installing boot loader
USB stick set up as live image!
