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
  •  


NEW Dell X1018 X-Series Smart Managed Switches 16-Port Gigabit 2-Port SFP Switch picture

NEW Dell X1018 X-Series Smart Managed Switches 16-Port Gigabit 2-Port SFP Switch

$44.00



Cisco Catalyst WS-C3650-48PQ-S 48 Port PoE 4x10G Uplink Ethernet Network Switch picture

Cisco Catalyst WS-C3650-48PQ-S 48 Port PoE 4x10G Uplink Ethernet Network Switch

$53.99



Cisco Catalyst WS-C3850-24P-L 24 Port PoE+ Gigabit Ethernet Switch TESTED picture

Cisco Catalyst WS-C3850-24P-L 24 Port PoE+ Gigabit Ethernet Switch TESTED

$49.99



Dell X1018 X-Series Smart Managed Switches 16-Port Gigabit 2-Port SFP Switch picture

Dell X1018 X-Series Smart Managed Switches 16-Port Gigabit 2-Port SFP Switch

$45.00



Cisco WS-C2960-48TT-L Catalyst 2960 48 Port Managed Network Switch picture

Cisco WS-C2960-48TT-L Catalyst 2960 48 Port Managed Network Switch

$33.01



Netgear 8-Port 10/100/1000 Gigabit Ethernet Unmanaged Switch Factory Sealed  picture

Netgear 8-Port 10/100/1000 Gigabit Ethernet Unmanaged Switch Factory Sealed

$24.00



New RJ45 MINI 5-Ports Fast Ethernet Network Black Switch Hub for Desktop PC picture

New RJ45 MINI 5-Ports Fast Ethernet Network Black Switch Hub for Desktop PC

$10.99



TP-LINK TL-SG1005P 5-Port Desktop POE+ Switch Version 5.6 picture

TP-LINK TL-SG1005P 5-Port Desktop POE+ Switch Version 5.6

$24.95



Fortinet FortiSwitch FS-124D-POE 24 Port Gigabit Ethernet Switch UNREGISTERED picture

Fortinet FortiSwitch FS-124D-POE 24 Port Gigabit Ethernet Switch UNREGISTERED

$99.97



Cisco Catalyst WS-C2960X-24PS-L 24 Port Managed Gigabit Ethernet Network Switch picture

Cisco Catalyst WS-C2960X-24PS-L 24 Port Managed Gigabit Ethernet Network Switch

$53.95