Results 1 to 3 of 3

Thread: tohd - then run lilo

  1. #1
    Junior Member
    Join Date
    Apr 2003
    Location
    Denmark
    Posts
    6

    tohd - then run lilo

    Hi

    Today I tried the "tohd" command for the first time. One thing I was thinking about was to make a scipt which run lilo and install a boot manager on the hd.

    The script could possibly be run from inside /etc/init.d/knoppix-autoinstall.

    One problem is to detect if there is already is a boot manager installed. I guess this this could be done by looking for a lilo.conf or grub.conf on all the partitions but it might be better just to ask the user: "Are you sure would install a boot-loader".

    The other problem is to find where the Windows installations is located. Usually they would be found at hda1.

    Here is the lilo.conf I used today:
    Code:
    boot=/dev/hda
    
    default=knoppix
    prompt
    nowarn
    timeout=100
    image=/mnt/hda1/knoppix/vmlinuz
            label=knoppix
            root=/dev/hda1 # probably not needed
            initrd=/mnt/hda1/knoppix/miniroot.gz
            append="lang=da quiet noscsi" # home=scan myconf=scan
            vga=normal
            read-only
    other=/dev/hda1
            label=windows
            table=/dev/hda
    To install the lilo I start up from the cdrom and run the following commands as root:
    Code:
    mount /mnt/hda1
    mount -o loop /cdrom/KNOPPIX/boot.img /mnt/test
    cp -f /mnt/test/vmlinuz /mnt/hda1/knoppix/
    cp -f /mnt/test/miniroot.gz /mnt/hda1/knoppix/
    umount /mnt/test
    umount /mnt/hda1
    The following commands should be run each time lilo.conf has to be changed:
    Code:
    mount /mnt/hda1
    vi /mnt/hda1/knoppix/lilo.conf
    rm -f /boot # don't know how to avoid this
    ln -s /mnt/hda1/knoppix /boot # and this
    lilo -v -C /mnt/hda1/knoppix/lilo.conf -b /dev/hda
    umount /mnt/hda1
    Would you think it is safe to write a script which does the above? I find it a bit scaring to write a boot manager to an end-user harddisk.

    /hans

  2. #2
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    Personally I prefer GRUB because it's more flexible and breaks less often

  3. #3
    Member registered user
    Join Date
    Feb 2003
    Posts
    61

    Works great!

    chlor,

    I just tried your example and it worked great! I can now boot my system without the Knoppix CD....and using the "tohd" command

    I ran into a few places in your script where the "knoppix" should be capital "KNOPPIX" because that's how the "tohd" command writes it to the drive... not knowing what version you used, maybe your's was different. Not a big oops, but it might really confuse some newbies.

    Code:
    note: change the 'da' to 'en' for all you english speakers!!
    After the '#' is commented out...add those inside to use them.
    I also deleted the other section because the drive only has Knoppix on it...if that's the case you'll get an error lilo tries to find windows.

    Code:
    boot=/dev/hda
    
    default=knoppix
    prompt
    nowarn
    timeout=100
    image=/mnt/hda1/KNOPPIX/vmlinuz
            label=knoppix
            root=/dev/hda1 # probably not needed
            initrd=/mnt/hda1/KNOPPIX/miniroot.gz
            append="lang=da quiet noscsi" # home=scan myconf=scan
            vga=normal
            read-only
    other=/dev/hda1
            label=windows
            table=/dev/hda
    I created my lilo.conf on the desktop using the default editor cause I'm not good at vi yet....that may help some newbies out there. Also, for some reason, it wouldn't let me make the hda1 read/write, so I had to copy over lilo.conf from the root shell.

    Code:
    from the default root prompt {KNOPPIX}
    to copy the lilo.conf file from the desktop
    Code:
    cd Desktop
    cp -f lilo.conf /mnt/hda1/KNOPPIX/

    To install the lilo I start up from the cdrom and run the following commands as root:
    Code:

    Code:
    mount /mnt/hda1
    mount -o loop /cdrom/KNOPPIX/boot.img /mnt/test
    cp -f /mnt/test/vmlinuz /mnt/hda1/KNOPPIX/
    cp -f /mnt/test/miniroot.gz /mnt/hda1/KNOPPIX/
    umount /mnt/test
    umount /mnt/hda1

    The following commands should be run each time lilo.conf has to be changed:
    Code:

    Code:
    mount /mnt/hda1
    rm -f /boot # don't know how to avoid this
    ln -s /mnt/hda1/KNOPPIX /boot # and this
    lilo -v -C /mnt/hda1/KNOPPIX/lilo.conf -b /dev/hda
    umount /mnt/hda1

    Hope this helps somebody else out!

    That 'tohd' function is GREAT!!! Thanks everybody!

Similar Threads

  1. tohd fails
    By tmj0nes99 in forum Hdd Install / Debian / Apt
    Replies: 1
    Last Post: 03-30-2005, 07:16 PM
  2. Knoppix 3.7 tohd error
    By lester in forum General Support
    Replies: 3
    Last Post: 01-27-2005, 03:47 PM
  3. Question about tohd
    By Mercury 4063 in forum General Support
    Replies: 4
    Last Post: 11-12-2004, 09:52 PM
  4. tohd problem
    By crix in forum General Support
    Replies: 5
    Last Post: 08-25-2004, 04:56 PM
  5. How to add bootoption tohd in my remaster?
    By Blue in forum Customising & Remastering
    Replies: 0
    Last Post: 09-22-2003, 08:05 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
  •  


Micron 8GB DDR4 1Rx16 PC4-3200AA Laptop RAM Memory MTA4ATF1G64HZ-3G2E2 picture

Micron 8GB DDR4 1Rx16 PC4-3200AA Laptop RAM Memory MTA4ATF1G64HZ-3G2E2

$10.00



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

$13.99



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

$13.50



Micron 16GB DDR4-2400 SODIMM MTA16ATF2G64HZ-2G3E1 Laptop Memory RAM picture

Micron 16GB DDR4-2400 SODIMM MTA16ATF2G64HZ-2G3E1 Laptop Memory RAM

$21.99



Samsung 8GB (2x4GB) DDR3 1600MHz PC3 Desktop RAM Memory | M378B5173DB0-CK0 | picture

Samsung 8GB (2x4GB) DDR3 1600MHz PC3 Desktop RAM Memory | M378B5173DB0-CK0 |

$8.30



Team T-FORCE VULCAN Z 32GB (2 x 16GB) PC RAM DDR4 3200 (PC4 25600) Memory picture

Team T-FORCE VULCAN Z 32GB (2 x 16GB) PC RAM DDR4 3200 (PC4 25600) Memory

$54.99



HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin picture

HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin

$15.90



A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G picture

A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G

$13.99



A-Tech 128GB 4x 32GB 2Rx4 PC4-19200R DDR4 2400 ECC REG RDIMM Server Memory RAM picture

A-Tech 128GB 4x 32GB 2Rx4 PC4-19200R DDR4 2400 ECC REG RDIMM Server Memory RAM

$191.96



USB Flash Drive Memory Stick Pendrive Thumb Drive 4GB, 8GB, 32GB, 64GB 128GB LOT picture

USB Flash Drive Memory Stick Pendrive Thumb Drive 4GB, 8GB, 32GB, 64GB 128GB LOT

$230.40