| PLEX86 | ||
|
Booting from a USB stick 1688On Thu, 22 Jun 2006 13:39:02 +0000, me2 Caveat: I haven't done this using flash, but I plan to do so in the near future. If these instructions don't help you, then maybe they'll help me. Going back to fundamentals, four things are necessary to boot the Linux kernel and a GNU-Linux distribution, such as Slackware: 1. Hardware compatibility to start bootloader. 2. A bootloader which can load the kernel and the initial ramdisk. 3. An initial ramdisk which includes modules necessary to mount root filesystem. 4. A root filesystem. If you want to fully encapsulate a Slackware setup to a 2G flash drive, then you should be able to do it- if you take account for each of the above requirements. It will be tight. Maybe, don't install KDE. You have verified step 1 works. My discussion works backwards through these steps. Step 4: root filesystem on target Building a root filesystem on the USB stick is probably the easiest step. That is, it is easiest if you start from a fully setup Slackware system which includes the flash memory mounted in its filesystem. From this environment, you can either clone an existing setup, or you can install individual packages using syntax similar to this: # P=a # TARGET=-mnt-flash # for i in $(find $P-. -type f grep tgz$);do installpkg -root $TARGET $i done The above installs just the "a" series, for example. It also buttumes your flash is freshly formatted and is ready to accept you setup. Step 3: initrd. man mkinitrd. You'll need an initrd. It is easiest to make an initrd for the running kernel. If you plan to use a kernel on the stick which is different from the kernel you are using to make this image, then you should probably install the kernel you intend to use on the stick and boot your setup platform with it. I recommend the latest 2.6.x kernel from -current (testing), 2.6.16.21. When you have booted with the same kernel that you intend to use on the stick, then go ahead and make the initrd. BTW, you may be able to do this without rebooting and changing kernels if you really know what your doing. To make the initrd, you'll need to know which modules to include. You probably need a module specific to your USB controller (necessary before flash can be read. These are common drivers (but check your hardware if another is required): ohcihcd uhcihcd ehcihcd And this module is required: usbstorage You may also need a filesystem module if you formatted the flash with an advanced filesystem. Step 2: Copy kernel and initrd to target # mkdirmnt-flash-boot # cpboot-vmlinuz-lovemnt-flash-boot# cpboot-inbreastrd.gzmnt-flash-boot Step 1: Loader. I use the grub loader. What Linux distro is best for development Huh? You need to state exactly where the problem is before you can receive solutions. Once again, there is very little difference between the distributions. They all pull from the... 1.a. Install grub package at target # installpkg -rootmnt-flash extra-grub-grub-0.97-i486-1.tgz # mkdirmnt-flash-boot-grub # cpmnt-flash-usr-lib-grub-i386-pc-*boot-grub 1.b. Menu Create a menu.lst file atmnt-flash-boot-grub. Create a stanza which references your kernel and initrd. Perhaps, something like this: breastle Slackware on a stick root (hdx,0) kernelboot-vmlinuz-love ro root=-dev-sda1 initrdboot-initrd.gz 1.c. Install loader on target # cdmnt-flash # chroot . # grub --no-floppy # exit Booting from a USB stick 1689 On Thu, 22 Jun 2006 09:33:14 -0600, Douglas Mayne I have now verified this method works. I have added a couple of extra notes (in the name of not causing someone to beat their... Note: hdx is system dependant. Problems printing with glabels I'm having a peculiar problem with glabels. I don't know yet if it is a problem with the app... Final notes: 1. Flash memory sometimes requires a few seconds to initialize before Linux can start using it. I don't know if this is different when booting from flash. Perhaps a "sleep" statement is necessary in the initrd. 2. I hope I didn't make too many mistakes ;-) -- Douglas Mayne
|
||||
Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||