Results 1 to 6 of 6

Thread: HDD install on USB drive

  1. #1
    Junior Member
    Join Date
    Jul 2005
    Posts
    4

    HDD install on USB drive

    hello,

    currently the installer refuses to install on an USB HDD drive. it should be possible though - this is just a suggestion.

    regards
    a.

  2. #2
    Junior Member registered user
    Join Date
    Mar 2005
    Posts
    29
    Yes, it is possible. But a little bit tricky.

  3. #3
    Junior Member
    Join Date
    Jul 2005
    Posts
    4
    any info would be appreciated

    the installer refuses to install to /dev/uba1 (the USB drive is seen as such when booting from CD; Funny: one HDD installation I have sees it as /dev/sda1; another HDD installation see it as /dev/uba1)

    so the only option I see is to plunge into the install scripts...

    regards
    a.

  4. #4
    Junior Member registered user
    Join Date
    Mar 2005
    Posts
    29
    I have similar post in this thread, http://www.knoppix.net/forum/viewtopic.php?t=20539
    Quote Originally Posted by d00m3d
    Be warned, Knoppix is designed to be a LiveCD in principle. The use and installation to any media are at your own risks.

    I haven't tried the installation of Knoppix-4.0 DVD version, but installing Knoppix to a USB is indeed possible, but tricky.

    I have installed successfully Knoppix3.9 to a USB HDD, major steps are:

    1. Prepare a custom kernel without the ub support
    2. Install Knoppix into USB HDD, GRUB will fail at this point because of the nasty ub support
    3. Reboot an existing Linux system (or other LiveCD without ub), chroot into the Knoppix-partition in your USB HDD and install the custom kernel from (1).
    4. Make few changes to the mkinitrd.conf and modules in the /etc/mkinitrd directory
    5. Create a initrd for this kernel so that the kernel is capable to find the necessary modules during boot process.
    6. Install GRUB into the MBR of your USB HDD

    I know Knoppix-4.0 already get rid of the ub, so it may be more straightforward.

    If you are still interested in the steps as described above, I may write in more details.

    If you don't want to go thru these tedious steps, then the easiest way is to download and install the latest version of Kanotix (bleeding edge variant of Knoppix).
    I assume you can install Knoppix to the USB HDD and just having problems with the installer. As you are familiar with the mknod stuff, this may be easier for you. Follow the steps that are applicable to you.

    In step 1, you need to build a custom kernel without the ub. Make sure:

    CONFIG_BLK_DEV_UB=n (this entirely eliminate ub support in kernel)
    CONFIG_SCSI=m (default is y, but you need the presence of scsi_mod module to build initrd)
    CONFIG_BLK_DEV_SD=m (default is y, but you need the presence of sd_mod module to build initrd)

    In step 4,
    4.1 make the following changes to /etc/mkinitrd/mkinitrd.conf

    DELAY=5
    ...
    MKIMAGE = 'mkext2fs -f %s %s > /dev/null'
    ...

    This allows a 5 seconds delay because the init script in initrd have to recognize your USB device before init can mount it (as your root filesystem is resided in USB HDD). Otherwise, init will attempt to mount the root filesystem without recognizing it and lead to kernel panic.

    The -f flag is to force mkext2fs to build a initrd in ext2 filesystem instead of cramfs. This gives you an advantage that the resulting initrd image could be gzip uncompressed, mounted and allow you to make changes later, when necessary.

    4.2 add the followings to /etc/mkinitrd/modules

    usbcore
    scsi_mod
    sd_mod
    usb-storage
    uhci-hcd
    ehci-hcd
    ohci-hcd
    usbhid

    These are the necessary kernel modules for your initrd.

    In step 5, the mkinitrd script in Knoppix-3.9 does not work properly. To build the initrd, while you are still as root, you should:

    mkinitrd -k -o d00m3d.img your-kernel-version

    Without the -k flag, mkinitrd seems have created the initrd (d00m3d.img) but it is deleted automatically for unknown reasons! So, use the -k flag to keep the temporary working directory in /tmp.

    The d00m3d.img is actually a gzip compressed image and you should move it to /boot. To continue:

    cd /tmp/mkinitrd.xxx/initrd
    mv d00m3d.img /boot/initrd.img-xxxxxx

    In step 6, you may install GRUB to the MBR of your USB HDD manually. Assume you have the following HDD layout during Linux installation:

    /dev/sda is your USB HDD
    /dev/sda1 is your root partition /

    Your /dev/sda should be recognized as (hd1) by GRUB.

    Steps:

    1. Become root
    2. Run grub
    #grub
    Probing devices to guess BIOS drives. This may take a long time.

    3. In grub shell, run the following commands:
    >root (hd1,0)
    >setup (hd1)
    >quit

    Here, (hd1,0) correspond to your /dev/sda1 which is your / (more precisely, /boot, i.e. the place where your kernel image and initrd are located).
    (hd1) is the MBR of your /dev/sda (USB HDD)

    That's it. However, you need to edit your /boot/grub/menu.lst as well.

    If you setup your BIOS to boot your USB HDD, grub will recognize your USB HDD
    as the first hard disk to boot, i.e. hd0, not hd1. In this case, your have to write the menu.lst as:

    title Knoppix on USB HDD.....
    root (hd0,0)
    kernel vmlinuz-xxxxx .....
    initrd initrd.img-xxxxx
    .....

    Clear?

    Good luck!

  5. #5
    Junior Member
    Join Date
    Jul 2004
    Posts
    6
    I installed knoppix on a harddrive. I then took it out of the laptop and put it in a usb enclosure. I need a way to boot to it from cd because I do not have boot usb option in my motherboard. I suspect i will have to do a rescue and reconfigure grub/lilo also. any ideas on doing this?

  6. #6
    Moderator Moderator
    Join Date
    Mar 2004
    Location
    Menlo Park, California
    Posts
    674
    You may also try this way to boot Knoppix 4.02 from a USB drive: http://www.knoppix.net/forum/viewtop...?p=93758#93758
    This thread also describes how to run knoppix from the hdd without creating a new partition for knoppix and without touching the mbr or the boot sector of your disk/partition. This is a very clean way and much faster way to run Knoppix than from the cd/dvd/usb. Please give me some feedback and let me if it works for you.
    Best Regards, Gilles

Similar Threads

  1. Can't Install To HD, Because Drive Is Read-Only.
    By distiller in forum Hdd Install / Debian / Apt
    Replies: 4
    Last Post: 10-26-2005, 04:16 PM
  2. INSTALL WIN XP + KNOPPIX on one USB DRIVE
    By KENYX in forum Hdd Install / Debian / Apt
    Replies: 5
    Last Post: 08-16-2005, 04:24 PM
  3. Replies: 1
    Last Post: 05-15-2005, 09:48 PM
  4. HDD Install on SATA Drive
    By arbeck in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 03-15-2004, 09:29 PM
  5. Hard drive Install
    By Gregwithoneg in forum General Support
    Replies: 6
    Last Post: 05-22-2003, 01:41 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
  •  


HP ProLiant DL380 Gen9 8SFF Server - E5-2698 v3 - 32Cores - 128GB Ram - 1TB HDD picture

HP ProLiant DL380 Gen9 8SFF Server - E5-2698 v3 - 32Cores - 128GB Ram - 1TB HDD

$299.00



HP ProLiant ML350 Gen 9 Server 64GB RAM 2.4GHz Xeon 12-Core E5-2667 v3 picture

HP ProLiant ML350 Gen 9 Server 64GB RAM 2.4GHz Xeon 12-Core E5-2667 v3

$300.00



HP ProLiant DL380 Gen9 Server 1x Xeon E5-2620V3 2.40 GHz 16 GB RAM No OS No HDD picture

HP ProLiant DL380 Gen9 Server 1x Xeon E5-2620V3 2.40 GHz 16 GB RAM No OS No HDD

$114.95



Lenovo SR530 Server (Intel Xeon Silver 4110) (3x 800GB SSD) (NO OS) (48GB RAM) picture

Lenovo SR530 Server (Intel Xeon Silver 4110) (3x 800GB SSD) (NO OS) (48GB RAM)

$599.00



Dell PowerEdge R620 Dual Intel Xeon E5-2697 v2 @2.70GHz 128GB RAM No HDD S110 picture

Dell PowerEdge R620 Dual Intel Xeon E5-2697 v2 @2.70GHz 128GB RAM No HDD S110

$144.50



Dell PowerEdge R620 Server 2x E5-2660 v2 2.2GHz 20 Cores 256GB RAM 1x 480GB SSD picture

Dell PowerEdge R620 Server 2x E5-2660 v2 2.2GHz 20 Cores 256GB RAM 1x 480GB SSD

$130.49



Dell PowerEdge R430 - E5-2640 v3 2.60GHz 16GB RAM - NO HDDs picture

Dell PowerEdge R430 - E5-2640 v3 2.60GHz 16GB RAM - NO HDDs

$119.99



Lenovo Thinkstation P520 Server XEON W-2135 3.7GHz 64GB 512GB QUADRO P1000 picture

Lenovo Thinkstation P520 Server XEON W-2135 3.7GHz 64GB 512GB QUADRO P1000

$215.00



IBM Power S822 8284-22A 12SFF Power8 3.89GHz 6Core 64GB RAM No HDD Server System picture

IBM Power S822 8284-22A 12SFF Power8 3.89GHz 6Core 64GB RAM No HDD Server System

$359.99



Lenovo ThinkSystem ST50 V2 Tower Server Intel Xeon E-2324G 3.10 GHz 16 GB RAM picture

Lenovo ThinkSystem ST50 V2 Tower Server Intel Xeon E-2324G 3.10 GHz 16 GB RAM

$774.99