Results 1 to 5 of 5

Thread: Unmodified Knoppix 6.2.1 on GRUB-booted external Unix USB device, from scratch

  1. #1
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802

    Unmodified Knoppix 6.2.1 on GRUB-booted external Unix USB device, from scratch

    You don't need Unetbootin, extlinux or brain-damaged HD installs to run Knoppix on "pure Linux".
    I haven't tried several variations of the method yet, and I know too little about what made the first attempts not work, but I got a USB-mounted harddisk up and running with GRUB and 6.2.1 without any great expertise. The same should work with sticks, but hard disks are maybe less variable in their interactons with computer BIOSes???

    I did all steps running the Knoppix 6.2.1 from the internal HD install.

    1. Partition the drive, one 20+ GB Linux partition plus eventually some more. I used 250 GB for ext3, plus 40 GB for FAT32 (Data exchange+++). I could have added swap, but that's not strictly necessary. As GRUB happily boots multiple systems, you could have multiple partitions to have room for more systems.

    2. Setup ext3, possibly with smaller block size, turn off fsck. See instructions on this site.

    3. Mount a partition with a plain working GRUB installed. Without this, I seemed to get problems.

    4. Mount the ext3 partition, /media/sdb1 works just nice.

    5. Run grub-installer
    Code:
    grub-installer --recheck --no-floppy root-directory=/media/sdb1 /dev/sdb
    6. If this does NOT work, you'll have to analyze why. Check that there is a boot-directory with subdirectory boot/grub. Check the contents of device.map there. You may have to repair your MBR if things have gone terribly bad - cheer up, it's not too hard to fix.

    7. Prepare for booting Knoppix. Make a subdirectory under boot and copy the necessary files there. (See my harddisk install post)

    8. Create or edit boot/grub/menu.lst. There may be a lot of confusion as to which drive is which during the early stages of booting. I used the entry for the HD install as template, but added the cheat code fromhd=/dev/sdb1 to make sure the KNOPPIX on the partition would always be used.

    9. You can check the booting with qemu
    Code:
    qemu /dev/sdb
    10. Copy the entire KNOPPIX 6.2.1 structure to the partition, without any modifications in the first place. I used a backup to copy from, avoiding copying from the live system.

    Now you should be able to boot from the USB, and choose the resident Knoppix 6.2.1 to run. At least, I was

    There are several advantages to this approach compared to syslinux/extlinux. One possible great advantage vs FAT32 installs, is that we can make larger persistent storage. But I haven't tried out that yet.

    This method should also be usable for setting up disks outside their target machines for mounting later. Only drive/device names should have to be modified, or are there more complications?

    I'm still sure someone can come up with some perverse reasons for still doing "ordinary" HD installs of Knoppix, but to me, those excuses are getting more perverse all the time.
    Last edited by Capricorny; 06-07-2010 at 11:12 AM.

  2. #2
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802
    I think setting up a separate booting partition may be even safer, as GRUB and it's loading kernels etc can then live entirely in peace, and all kinds of distro changes can take places outside of the booting realm, the only changes to booting being kernel updates etc. I also wonder if installing GRUB from another distro might be a defensive move. Myself, I'm going to start using CentOS as a second installed OS version, to test out applications for Redhat Enterprise Linux (RHEL) use. So, maybe I will be installing GRUB from there, to a separate partition.

  3. #3
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802

    6.4.4 update, same POG (plain old grub) I believe

    From bad experiences (not mine) with grub not being able to run on corrupted journaling file systems, I have come to the conclusion that whenever possible, I should heed the old advice and create a separate boot partition, also on usb-sticks etc.

    If we place that partition at the "end" of the stick, it is not disturbing much, so here's what I do:

    1. I typically create a N-0.3 GB first partition, and a 0.3 GB boot-partition on the stick.

    2. Format the boot-partition with ext2, the other with anything usable.

    3. Mount the boot partition.

    4. Next, install grub on the MBR of the stick and the boot-partition
    Code:
    grub-install --root-directory=/media/sdb2 /dev/sdb
    5. Create a boot subdirectory, and copy over the Knoppix boot files from /mnt-system/boot/syslinux - I assume you are running from a version with correct boot-directory:
    Code:
    mkdir /media/sdb2/boot/knx644
    rsync -ax /mnt-system/boot/syslinux/ /media/sdb2/boot/knx644
    6. Create a suitable menu.lst file with boot entries first for the stick, e.g.

    Code:
    default=1
    timeout=10
    
    
    title Knoppix 6.4.4 all arch
          kernel (hd0,1)/boot/knx644/linux ramdisk_size=100000 lang=en keyboard=no fromhd=/dev/sdb1 nosound vt.default_utf8=0 apm=power-off initrd=minirt.gz nomce libata.force=noncq loglevel=1 tz=localtime
          initrd (hd0,1)/boot/knx644/minirt.gz
    
    title Knoppix 6.4.4 64 bits
          kernel (hd0,1)/boot/knx644/linux64 ramdisk_size=100000 lang=en keyboard=no fromhd=/dev/sdb1 nosound vt.default_utf8=0 apm=power-off initrd=minirt.gz nomce libata.force=noncq loglevel=1 tz=localtime
          initrd (hd0,1)/boot/knx644/minirt.gz
    Note that the correct init parameters may vary with release, I was quite confused when booting 6.4.4 with the seemingly innocent 6.2.1 init line gave different strange errors on booting, leading me to suspect file corruption. Copy the actual APPEND line from syslinux.cfg and edit.

    One nice thing with this setup, is that you don't have to reinstall the booting machinery for booting other OS versions, devices etc. Just add subdirectories under /boot with the correct files (when necessary), and edit the menu. Just varying minirt.gz (one per directory) is a simple and safe way of experimenting with different system setups.

    AFAIK, this simple editing is not easy with grub2. So I can't regard that version as neither grand nor unified. But bootloader, maybe yes.
    Last edited by Capricorny; 06-10-2011 at 02:31 PM.

  4. #4
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802
    1. I typically create a N-0.3 GB first partition, and a 0.3 GB boot-partition on the stick.
    Add: "Make the boot partition active". Just forgot to do that when setting up a 1TB WD Passport this way, with at tiny boot partition at the end.

  5. #5
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802
    Update for SD and micro SD cards: For larger than 2GB cards, using a small boot directory has been necessary. I have successfully set up micro SD cards with grub this way, booting from a card reader. I have, however, not been able to boot from a smartphone (Android 2.2) using the same card. Running Knoppix off the card in the phone works, though.

    I have found legacy grub very handy for such hardware, but haven't tried grub4dos so far. The boot partitions at the end of the sector list does not seem to interfere with ordinary use of the card in cameras, phones etc. One of the really practical things with grub, is that I can add multiple entries to accomodate different boot configurations.

    Beware of drive designations when using cards in multiple card readers!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


A lot 8 of 16GB HYNIX DDR4 2133 2Rx4 PC4-2133P HMA42GR7AFR4N-TF RAM MEMORY RDIMM picture

A lot 8 of 16GB HYNIX DDR4 2133 2Rx4 PC4-2133P HMA42GR7AFR4N-TF RAM MEMORY RDIMM

$99.99



Team T-FORCE VULCAN Z 16GB (2 x 8GB) DDR4 3200 PC Ram Intel XMP 2.0 Memory picture

Team T-FORCE VULCAN Z 16GB (2 x 8GB) DDR4 3200 PC Ram Intel XMP 2.0 Memory

$27.99



A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G picture

A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G

$11.99



A-Tech 16GB 2 x 8GB PC3-12800 Laptop SODIMM DDR3 1600 Memory RAM PC3L 16G DDR3L picture

A-Tech 16GB 2 x 8GB PC3-12800 Laptop SODIMM DDR3 1600 Memory RAM PC3L 16G DDR3L

$23.98



Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3 picture

Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3

$46.95



A-Tech 16GB 2x 8GB PC3-10600 Desktop DDR3 1333 MHz DIMM 240pin Memory RAM 16G 8G picture

A-Tech 16GB 2x 8GB PC3-10600 Desktop DDR3 1333 MHz DIMM 240pin Memory RAM 16G 8G

$23.98



Patriot Steel RGB 8GB 16GB 32GB DDR4 RAM 3200 3600 C18/C20 UDIMM Desktop Memory picture

Patriot Steel RGB 8GB 16GB 32GB DDR4 RAM 3200 3600 C18/C20 UDIMM Desktop Memory

$19.99



A-Tech 16GB DDR4 2400 MHz PC4-19200 Laptop SODIMM 260-Pin 2Rx8 Memory RAM 1x 16G picture

A-Tech 16GB DDR4 2400 MHz PC4-19200 Laptop SODIMM 260-Pin 2Rx8 Memory RAM 1x 16G

$24.99



A-TECH Components 16GB Kit 8GB SODIMM DDR3 PC3-12800 1600mhz Laptop RAM Memory picture

A-TECH Components 16GB Kit 8GB SODIMM DDR3 PC3-12800 1600mhz Laptop RAM Memory

$11.00



A-Tech 64GB 2x 32GB 2Rx4 PC4-21300R DDR4 2666MHz ECC REG RDIMM Server Memory RAM picture

A-Tech 64GB 2x 32GB 2Rx4 PC4-21300R DDR4 2666MHz ECC REG RDIMM Server Memory RAM

$65.98