-
Success making bootable and persistent USB key with SYSLINUX
I've had success installing an entire Knoppix CD to a USB thumbdrive. Also was able to create the Knoppix persistent image, with encryption, on the same USB thumbdrive. All told, it fits perfectly on a 1GB thumbdrive, a fairly common size these days.
750MB for Knoppix's 700MB CD (plus overhead)
100MB for the encrypted persistent image
150MB leftover for unimportant file storage, and use on Windows systems
After checking this page:
http://www.knoppix.net/wiki/USB_Based_FAQ
I got the thumbdrive to boot with GRUB, as it said. All went well... until I went to another computer. It had more SCSI drives, and so the drive numbers had changed! GRUB's awkward (hd0,0) syntax could no longer find the drive, and GRUB failed to boot (didn't even get as far as the GRUB command line).
So, GRUB was out.
KNOPPIX itself uses ISOLINUX, part of the SYSLINUX suite of bootloaers, so why not just use SYSLINUX? Turns out, it worked great! GRUB also doesn't give you the pretty "speedometer" loading screen, which SYSLINUX does (since it's essentially a twin of ISOLINUX, it boots up in the same style). I'm posting this from Knoppix now.
Some rough steps (I'll write this up more, if there's interest, perhaps make a new Wiki page or something):
1) Partition and format the ENTIRE USB thumbdrive as one big FAT32 partition. Mark it as active. If you have "cfdisk", use its Maximize feature to squeeze out an extra 0.5MB of space "for free". No need to make more than one partition. Copy SYSLINUX's "mbr.bin" file over your existing MBR, to make it bootable. Don't mount the new partition just yet.
2) Run SYSLINUX on that new partition. The default SYSLINUX options are OK. Now, it's OK to mount the new partition. You should see the file "ldlinux.sys" there.
3) Mount the Knoppix ISO. Copy its entire contents to your USB thumbdrive! Make sure the directories line up, so that all things are in the same place on the USB thumbdrive as they are on the CD.
4) Unmount the Knoppix ISO, you won't need it anymore. On your USB thumbdrive, go to the directory /boot/isolinux. Move ALL files in this directory to the top level of the drive (where the existing autorun files already are). As they are now empty, you may completely remove the /boot/isolinux and /boot directories.
5) Rename the file isolinux.cfg to syslinux.cfg.
6) You're ready to boot! If you have a newer USB 2.0 thumbdrive, though, you've got some more work ahead of you. Now comes the hard part. You'll have to edit the linuxrc file inside of the minirt.gz file, to fix a Knoppix bug where it will fail to load the USB module at startup. Search other forum posts here for how to do this
7) Reboot, trying to boot from USB. Did it work? Cool!
Make sure Knoppix works. Try to create a persistent Knoppix disk image, using the tool under the penguin menu. When it asks you to choose a partition, choose your USB thumbdrive. If it complains about it being unable to mount because it's already mounted, do this:
mount -o remount,rw /cdrom
mount --bind /cdrom /mnt/sdz1
(replace sdz1 with the true device name of your USB thumbdrive's partition, of course)
Now, try again, and it should let you make the persistent image.
9) As an optimization, try editing the syslinux.cfg file. I like reducing the timeout in the 3rd line (to 30 from 300) so that it boots automatically without having to wait so long. Also, I like adding these options to the 2nd line:
noeject noprompt home=scan dma noswap
No point trying to "eject the CD and close drive door" when it's a USB thumbdrive! The other cheatcodes are for autoloading your persistent image next time, DMA speed increase, and security fix (never use swap, because it's not encrypted).
10) Reboot again. It should ask you for your password, for the encryption, and then load up just fine.
Nice!
If you saw an earlier post of mine, I tried EXTLINUX at first (not SYSLINUX). Unfortunately, that was no good, because Knoppix is more difficult to boot on case-sensitive filesystems (it will have trouble finding certain things as it loads). Also, EXTLINUX can't be easily used on Windows, but FAT32 can. Having one big partition makes a much better use of space on the thumbdrive.
If anyone else has had success doing something like this, feel free to post your tips here as well.
Josh
Similar Threads
-
By jengiscan in forum MS Windows & New to Linux
Replies: 3
Last Post: 08-25-2008, 11:15 AM
-
By Joseph Schiller in forum Customising & Remastering
Replies: 2
Last Post: 11-17-2004, 11:44 PM
-
By hw.stadl0r in forum Customising & Remastering
Replies: 2
Last Post: 05-14-2004, 04:01 PM
-
By matt_w_lambert in forum Customising & Remastering
Replies: 6
Last Post: 01-05-2004, 10:20 PM
-
By ironstorm in forum Hdd Install / Debian / Apt
Replies: 5
Last Post: 11-23-2002, 08:26 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Dell Latitude LAPTOP 14” HD NOTEBOOK PC i5-8265U UP TO 32GB 2TB M.2 WIN 10 OR 11
$284.59
Lenovo IdeaCentre Mini 01IRH8 (1TB SSD, Intel Core i7 13th Gen., 5.00 GHz, 16GB)
$450.00
Dell 14" TOUCHSCREN Laptop 8th Gen Core i5 16GB RAM 512GB SSD/256 Bluetooth W11
$235.00
CHUWI 13.3in Aerobook Intel Core M3 Laptop Computer 8GB 256GB SSD Windows 11 H
$189.99
Intel Core i5-8400 2.80-4.0GHz 6-Core 9MB 8th Gen. Coffee lake CPU LGA1151 SR3QT
$45.00
Intel - Core i5-13600K 13th Gen 14 cores 6 P-cores + 8 E-cores 24M Cache, 3.5...
$314.99
DELL LATITUDE E7470 TOUCH Laptop w/ Core i7-6600U 2.60 GHZ + 8 GB No HD/Battery
$75.00
Lenovo ThinkPad E14 Gen 2 14-inch i5-1135G7 8GB 256Gb SSD Win 10 Pro No AC Grd C
$139.99
HP OMEN 30L 38T60AV Gaming Desktop Ryzen 5 5600X 3.70GHz RTX3090 8GB 256GB W11H
$899.00
Dell Optiplex 5040 MT Core i5-6500 3.20GHZ 8GB RAM 256GB SSD Win 10 Pro WiFi
$89.99