Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: How to start HD knoppix with just CD?

  1. #1
    Junior Member
    Join Date
    Nov 2003
    Posts
    2

    How to start HD knoppix with just CD?

    How do I start a harddisk-installed Knoppix using just the Knoppix CD? That is, boot off CD, but run off hard disk?

    I installed Knoppix 3.3 onto my laptop's hard disk (hda4) using knx-hdinstall. I did not make a boot floppy as I do not have a floppy drive. I did not specify LILO as I did not want to mess up my finicky WinXP partitions. I thought I could specify at the Knoppix CD boot prompt, something to boot off hda4, using "knoppix fromhd=/dev/hda4", but that did not work. I then tried downloading loadlin.exe and used the hda4's vmlinuz, but I get a message that the WinXP command prompt is not really DOS. I tried (as root in CD Knoppix) mounting /mnt/hda4 and then doing a chroot, but it still ran off the CD.

    Can someone help? I want to boot off the Knoppix CD and somehow get the hard disk Knoppix to then take over.

    Thanks in advance!
    Lynn

  2. #2
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    555
    I don't think what you want to do is possible. It should be possible to boot off
    the CD then direct it to find the big KNOPPIX file on the HD - but that's the so-
    called poor man's install, which does not work from an NTFS unit and you've
    done the full install anyway. loadlin needs fat and cannot handle NTFS either.
    So you should install lilo, really. If you absolutely do not want to allow it to
    control your MBR, install it to the start of your root partition (apparently hda4).
    Then you can copy the boot sector (a smallish 512 byte file) to your C: drive
    but that's gonna be complicated if you have no floppy and C: is NTFS. Well
    provided you find a way (hint: explore2fs), then you can create an entry for
    linux in the XP boot loader (boot.ini). Frankly that's a lot of trouble to avoid
    letting lilo do its job!

  3. #3
    Junior Member
    Join Date
    Nov 2003
    Posts
    1
    Lynn,
    I think this may help you - I use this to run knoppix from my external firewire drive. Which shows just another usage of knoppix - I can hijack about any computer I want and run my complete (adapted) Knoppix environment directly from this computer without installing any single byte on the other computers harddrive ...

    What I normally do:

    put in the knoppix CD
    in the F2 screen (sheatcodes) type
    "knoppix single"

    which will make knoppix start up in single user mode.

    type
    sudo su
    mkdir /mnt/new_root
    to create a mountpoint for your new root.

    Then I normally mount my external firewire disk, by first loading the firewire subsystems (you can skip this - I just include it in case someone else wants to run Knoppix from an external firewire or USB drive):

    ----------------------------------
    for firewire:

    modprobe ieee1394
    modprobe ohci1394
    modprobe sbp2

    in case your external firewire or USB2 drive is not automatically detected: run the script "rescan-scsi-bus.sh" you find at http://www.garloff.de/kurt/linux/rescan-scsi-bus.sh )
    ----------------------------------


    Here you will have to continue:

    mount /dev/hda2 /mnt/new_root (use the partition your knoppix is on - I took /dev/hda2 as an example)
    mkdir /mnt/new_root/mnt/old_root (make place to put your current root ...)
    cd /mnt/new_root (go to your /dev/hda2 disk)
    pivot_root . /mnt/new_root/mnt/old_root (and make it your new root ...)
    mount /proc /proc -t proc (Don't know anymore why I added this, but I know I needed it)

    which basically remaps your running "root" - the running root becomes /mnt/old_root, and the /mnt/new_root (your knoppix partition) becomes your running root - just as you want.

    Then type

    init 5

    to continue the rest of your startup process from your harddisk partition.
    I don't know if this is technically the correct way to do it, but I sure was very glad to find out that it just works ...
    In case someone of the more technical people on the board know of a better way to boot firewire (or got any suggestion to improve the above script), I'd like to find out.


    Baldyeti,
    don't be to quick to say something is impossible with linux

  4. #4
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    555
    Sure. I probably could have come up with something even more contorted to astonish the newbies out there.
    Your inventive solution is certainly fine for a portable drive you want to hook to different systems,
    ...but in the case of a single machine, lilo _is_ a proven boot-loader.
    Besides as I originally suggested, the NT/XP bootloader can be used as well.
    IMHO, the aim should _not_ be to make linux look complicated.

  5. #5
    Junior Member
    Join Date
    Nov 2003
    Posts
    2
    Tinker
    You are a genius, it works perfectly! I had a feeling there was a way to do it in Linux without having to use LILO. After all this must be what initrd/ramdisk essentially does to use the file system on the CD? LILO is a great boot manager, but in this case I simply did NOT want a hard disk based boot manager. I learned something new today, and am glad that with Linux I am not a sandboxed and patronized lemming end user that some large OS companies would like us to be
    Thanks for all your help--your constructive and detailed advice is greatly appreciated!
    Lynn

    knoppix single (at boot prompt)
    sudo su
    mkdir /mnt/new_root
    mount /dev/hda4 /mnt/new_root
    mkdir /mnt/new_root/mnt/old_root
    cd /mnt/new_root
    pivot_root . /mnt/new_root/mnt/old_root
    mount /proc /proc -t proc
    init 5

  6. #6
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Europe
    Posts
    148
    My heroes.

    I've been trying to do something like this (on and off) for months. I've got an old laptop that has no internal HDD but which has access to a firewire drive via a PC Card. I tried building a custom kernel and creating an initrd (via pcinitrd), but it's just too advanced for me. Got a friend to have a go for me, but he too could not manage it.

    So I'll test this out this weekend (should work, although I have to make sure pcmcia drivers are loaded as well). If all goes well I'll revisit various threads I've added to/read that discuss this tricky config (booting, or more accurately putting the root on an external USB or 1394 drive) and point them to this thread.

    @Baldyeti - I agree that linux should be made easier for the average person, but at the same time it should not be dumbed down. One thing I like about Linux is that if something does not work, I can have a go at understanding and ultimately solving the problem as things are so open. Try doing that under Windows. Also these forums are for discussing advanced topics, learning, leaving linux-newbie-land etc. Anyway if this thing works for my old laptop I'll be very happy :))

  7. #7
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    This pivot root then init trick works provided that the target root has the same kernel modules as the boot up one(meaning /lib/modules'`uname -r` exists on target). Otherwise, expect troubles.

  8. #8

    Can Be Simpler

    I was just on the Forum looking for exactly this solution. Baldyeti, when I test this, I'll write a script and post it here so that the next person won't need to experience quite as much complexity when doing this maneuver.

  9. #9
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Europe
    Posts
    148
    Finally got round to trying this. Works as advertised with Koppix 3.2, will try with latest 3.3 (from 19th November 2003?) soon.

    Great, will finally be able to use my old laptop with the dead HDD :)

    Win_A_New_Head, if you did write a script that automates this process, I'm interested ;)

    Thanks everyone.

  10. #10
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    Europe
    Posts
    148
    I tried automating the process, but my 'script' does not work. I start off as normal:

    knoppix single (at boot prompt)
    sudo su
    lsmod (tells me firewire modules are loaded)

    Then I goto floppy to run two scripts:

    cd /mnt/floppy
    ls
    ./rescan-scsi-bus.sh (first one, works fine)
    ./start.sh

    But that gives me an ":bad interpreter : No such file or directory" error. I don't understand, when I type these commands, all goes well. Anything wrong with the script below? (I have no experience in shell scripting).

    Code:
    #!/bin/bash
    mkdir /mnt/new_root 
    mount /dev/sda5 /mnt/new_root 
    mkdir /mnt/new_root/mnt/old_root 
    cd /mnt/new_root 
    pivot_root . /mnt/new_root/mnt/old_root 
    mount /proc /proc -t proc

Page 1 of 3 123 LastLast

Similar Threads

  1. Before I Start Knoppix
    By Barton71 in forum General Support
    Replies: 4
    Last Post: 03-05-2005, 06:03 PM
  2. Knoppix won't start
    By ahnaqsh in forum General Support
    Replies: 2
    Last Post: 12-01-2004, 05:32 AM
  3. Hoe to start Knoppix on TV
    By banevere in forum Hardware & Booting
    Replies: 0
    Last Post: 02-22-2004, 08:31 AM
  4. How do you start knoppix?
    By Login_Here in forum General Support
    Replies: 1
    Last Post: 02-19-2004, 05:24 AM
  5. Knoppix does not start
    By mundhra_ritesh in forum General Support
    Replies: 3
    Last Post: 04-08-2003, 05:42 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
  •  


Dell R730 w/ 2x E5-2650v3 10c, 192GB (12x16GB) RAM, H730 Mini, 2x 750W PSU picture

Dell R730 w/ 2x E5-2650v3 10c, 192GB (12x16GB) RAM, H730 Mini, 2x 750W PSU

$499.99



Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x600Gb SAS, Proxmox picture

Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x600Gb SAS, Proxmox

$340.00



Dell EMC NX3230 Server picture

Dell EMC NX3230 Server

$599.99



Dell PowerEdge M610 Blade Server E5620@2.2GHZ (6x)8GB RAM (2x)146GB 15K SAS HDD picture

Dell PowerEdge M610 Blade Server E5620@2.2GHZ (6x)8GB RAM (2x)146GB 15K SAS HDD

$75.00



DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45 picture

DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45

$275.00



Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB picture

Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB

$510.00



Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD picture

Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD

$389.99



SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount picture

SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount

$224.99



Dell PowerEdge R620 Rack Server picture

Dell PowerEdge R620 Rack Server

$71.99



DELL PowerEdge R730 Server 2x E5-2643v3 3.4GHz =12 Cores 64GB H730 4xRJ45 picture

DELL PowerEdge R730 Server 2x E5-2643v3 3.4GHz =12 Cores 64GB H730 4xRJ45

$306.00