Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: setup lilo to boot from hd

  1. #1
    Member registered user
    Join Date
    Nov 2004
    Posts
    34

    setup lilo to boot from hd

    Hi,

    Is it possible to setup lilo to boot from hard disk with Knoppix installed as image (using knoppix tohd at the bootprompt) ?
    I do not want to install it using knoppix-installer.
    I am new to linux and I have no idea of this...
    I have only linux on my hard disk, so the configuration shouldn't be complicated, right?

    Pascal

  2. #2
    Senior Member registered user
    Join Date
    Aug 2003
    Location
    Dublin, Ireland
    Posts
    164

    Re: setup lilo to boot from hd

    Quote Originally Posted by sunpascal
    Is it possible to setup lilo to boot from hard disk with Knoppix installed as image (using knoppix tohd at the bootprompt) ?
    Maybe, you can certainly do this with grub and I would suspect with lilo also, but I would suggest grub rather then lilo. It doesn't make much difference though.
    Quote Originally Posted by sunpascal
    I have only linux on my hard disk, so the configuration shouldn't be complicated, right?
    I don't think it is too complicated but I don't know for sure how to do it and can't test it out here and now. Between what I know and am reading ...

    Boot into Knoppix and make a boot/grub directory on the partition you are using. You may need to copy the files stage* from /usr/share/grub/i386-pc (they could be somewhere else in which case locate stage might help) and put them in the boot/grub directory but I think grub-install will take care of this.

    Next create a menu.lst for grub in the boot/grub directory. You could probably steal and modify one from the last page of the thread on iso booting with grub and ntfs if you needed to but there's plenty of examples around. Here's an example from my menu.lst ,slightly modified to try and strip some of my unusual cheatcodes and make it suit you a bit better (if you have everything in the first partition of your first hard disk).

    Code:
    title Knoppix 3.7 kernel 2.6
    	kernel (hd0,0)/boot/linux26 ramdisk_size=100000 init=/etc/init lang=ie apm=power-off vga=791 nomce quiet noprompt splash dma fromhd=/dev/hda1
    	initrd (hd0,0)/boot/minirt26.gz
    	boot
    You'll probably need to get the linux26 and minirt26.gz from the cd.

    Finally run "grub-install --recheck --root-directory=/mnt/hda1 /dev/hda" again assuming you are just on the first partition of the first hard disk, and that you mount it as /mnt/hda1. I'm not certain recheck is neccessary, it may not be. Recheck checks the device mappings so as long as Klaus hasn't left some trace of his system behind, which I doubt, it probably generates it anyway. I'm also not sure if --root-directory is required, if grub needs to know about your menu.lst at this stage.

    If you try this and it works let everyone know! If you aren't brave enough say so also though and perhaps someone else will test it out or tell you for sure just how you should do this!

  3. #3
    Senior Member registered user
    Join Date
    May 2003
    Posts
    981
    Here is a (slightly edited) except from a how-to (not currently available since the docs are down).
    Code:
    Step 1: Partition the HD and install Knoppix 
    
    Partition the HD as above and install Knoppix as a 'Knoppix style' HD install. With Knoppix 3.3 & 3.4 the install command is 'sudo knoppix-installer', this may change for later versions of Knoppix. Put the bootloader lilo on the MBR, it will be used to boot the 'toHD' install as well. 
    
    Step 2: Install the 'toHD' system on hda1 & set up to boot from lilo 
    
    To install, just boot Knoppix with the boot code 'knoppix tohd=/dev/hda1' at the boot prompt.  
    
    In order to boot the 'toHD' install without requiring a boot disk, a directory /boot containing at least the minimum required files to boot Knoppix must be installed on hda1. First create the directory then as root do the following:
    
    For Knoppix 3.3:
     The minimum files are vmlinuz and miniroot.gz which can not be directly copied from the CD, they are buried in /boot.img. To extract the files, the boot.img must first be mounted on a loop device then on an intermediate mount point (use the existing directory /mnt/floppy) from which they can be copied to hda1. For simplicity we are just going to copy all the files in the boot.img. 
    
     /sbin/losetup /dev/loop0 /mnt/cdrom/KNOPPIX/boot.img 
     mount /dev/loop0 /mnt/floppy/ 
     cp /mnt/floppy/* /mnt/hda1/boot 
    
     Then edit /etc/lilo.conf adding the following:
    
     image=/mnt/hda1/boot/vmlinuz 
     label="toHDKnoppix" 
     append="lang=us fromhd=/dev/hda1 home=scan myconfig=scan apm=power-off" 
     initrd=/mnt/hda1/boot/miniroot.gz 
     read-only 
     (Change "lang=" as appropriate, only include the home=scan & myconfig=scan if you are using 'persistent home')
    
    For Knoppix 3.4 & up:
    
     The required files are linux24, linux26, minirt24.gz & minirt26.gz. These are located in the directory /boot/isolinux on the CD and can be directly copied to hda1 from there. The easiest way is to just use konqueror and drag-drop the entire directory '/mnt/cdrom/isolinux' to /mnt/hda1/boot/.
    
     Then add the following to lilo.conf:
             
            boot=/dev/hda
    
     image=/mnt/hda1/boot/isolinux/linux24
     label="Knoppix3.4-24"
     append="lang=us fromhd=/dev/hda1 home=scan myconfig=scan apm=power-off"
     initrd=/mnt/hda1/boot/isolinux/minirt24.gz
     read-only
    
     image=/mnt/hda1/boot/isolinux/linux26
     label="Knoppix3.4-26"
     append="lang=us fromhd=/dev/hda1 home=scan myconfig=scan apm=power-off"
     initrd=/mnt/hda1/boot/isolinux/minirt26.gz
     read-only 
    
            # Boot Windows on hda1
            other=/dev/hda1
     label="Windows"
     table=/dev/hda
    You should be able to install lilo from the toHD install but you will have to copy /etc/lilo.conf to /home first as you cannot edit in the /etc directory & then run lilo with 'lilo -C /home/etc/lilo.conf'.

  4. #4
    Member registered user
    Join Date
    Nov 2004
    Posts
    34
    ok, i tried both.
    However I can not write to / , not even from the root console. I had also trouble getting write acess to hda1 on which I have the knoppix image. It said Writable: Yes when I pointed on the icon on the desktop, but I could only copy the linux26 and minirt.gz from the command line.
    I now put my configuration files on my hda3 partition and specified that when I ran lilo and grub. Here's what I get when I do that:

    root@ttyp2[knoppix]# lilo -C /mnt/hda3/lilo.conf
    Warning: /mnt/hda3/lilo.conf should be owned by root
    /dev/mapper/control: open failed: No such device
    Is device-mapper driver missing from kernel?
    /dev/mapper/control: open failed: No such device
    Is device-mapper driver missing from kernel?
    Incompatible libdevmapper 1.00.19-ioctl (2004-07-03)(compat) and kernel driver
    Fatal: creat /boot/map~: Read-only file system

    root@ttyp2[knoppix]# grub-install /dev/hda
    mkdir: cannot create directory `/boot/grub': Read-only file system

    I don't quite get that...
    What am I doing wrong?[/url][/list][/list][/code][/quote]

  5. #5
    Senior Member registered user
    Join Date
    May 2003
    Posts
    981
    Quote Originally Posted by sunpascal
    ok, i tried both.
    However I can not write to / , not even from the root console. I had also trouble getting write acess to hda1 on which I have the knoppix image. It said Writable: Yes when I pointed on the icon on the desktop, but I could only copy the linux26 and minirt.gz from the command line.
    I now put my configuration files on my hda3 partition and specified that when I ran lilo and grub. Here's what I get when I do that:

    root@ttyp2[knoppix]# lilo -C /mnt/hda3/lilo.conf
    Warning: /mnt/hda3/lilo.conf should be owned by root
    /dev/mapper/control: open failed: No such device
    Is device-mapper driver missing from kernel?
    /dev/mapper/control: open failed: No such device
    Is device-mapper driver missing from kernel?
    Incompatible libdevmapper 1.00.19-ioctl (2004-07-03)(compat) and kernel driver
    Fatal: creat /boot/map~: Read-only file system

    root@ttyp2[knoppix]# grub-install /dev/hda
    mkdir: cannot create directory `/boot/grub': Read-only file system

    I don't quite get that...
    What am I doing wrong?[/url][/list][/list][/code]
    [/quote]

    The problem is that Knoppix locks the partition on which the toHD installed is installed so your 'save config file' and your 'persistent home' must be on a different partition. When it's running, /home/knoppix (your home directory as user knoppix) is in memory unless you have created a persistent home. You will have to create the directory /mnt/hda1/boot using either windows or running from CD if your toHD is on hda1.
    Note: If hda1 is an NTFS filesystem, don NOT write to is from Linux unless you use 'captive NTFS', if it's fat32 you are OK.
    I'm not sure what is causing the /dev/mapper error, to be honest I have not installed lilo from a toHD installation, the how-to was written intending it to be installed from a full HD installation as part of a remastering setup. There is a way, it's in the docs but the docs are still down. Maybe try installing lilo using the CD instead of from the toHD.

  6. #6
    Member registered user
    Join Date
    Nov 2004
    Posts
    34
    Even from the CD I can only create files from the root shell. No, I do not have windows and not a NTFS drive, this caused me already problems. The persisten home and config ARE ALREADY on a separate partition. I did create a boot/ directory and I copied the linux24 and minirt.gz to my ext3 filesystem. I just can't get the configuration files in the /etc directiory. And when I run grub or lilo a specify where my configuration file is, it just gives the errors I mentioned above.

    Thanks for your help anyway...

  7. #7
    Senior Member registered user
    Join Date
    May 2003
    Posts
    981
    Why don't you want to do a full HD install?

  8. #8
    Member registered user
    Join Date
    Nov 2004
    Posts
    34
    I had an HD install already, but I wasn't happy with the hardware detection.
    And some programs didn't work, for example nothig happened when I clicked Samba Server.

    By now I chose to install it as Knoppix Style. I'll see how it goes.

    I am just wondering: How can I change the permissions for the existing samba.conf? How can I edit it as knoppix? Isn't there a graphical way? I cannot log on as root using KDE from a Knoppix-CD-like install, right?

  9. #9
    Senior Member registered user
    Join Date
    May 2003
    Posts
    981
    Quote Originally Posted by sunpascal
    I had an HD install already, but I wasn't happy with the hardware detection.
    And some programs didn't work, for example nothig happened when I clicked Samba Server.

    By now I chose to install it as Knoppix Style. I'll see how it goes.

    I am just wondering: How can I change the permissions for the existing samba.conf? How can I edit it as knoppix? Isn't there a graphical way? I cannot log on as root using KDE from a Knoppix-CD-like install, right?
    I have run Knoppix style HD install for about a year, just recently changed to Debian sytle when I switched my Knoppix 3.4 install to Kanotix BH9. Just don't try to do an 'apt-get upgrade' on it, it survived one but I think I killed it with a second attempt.

    Not exactly true, see this: http://www.knoppix.net/forum/viewtopic.php?t=16319

    But there are several ways to work as root in a knoppix style install. There is the root shell entry on the start menu (although it is just as easy to open a normal terminal & type 'su'). If you first type 'xhost localhost' as user, you will be able to open X applications from root terminal eg 'konqueror' will open konqueror. You can also use kdesu from a terminal (logged in as user): eg 'kdesu konqueror' will start konqueror as root. To use kdesu you must first set a password for root, 'sudo passwd' will do that. I have desktop start icons for konqueror-as-root & kate-as-root. These I just drag'n'drop copied the icons from the start menu to the desktop then edited the application to run to be 'kdesu kate' instead of just 'kate'.

  10. #10
    Member registered user
    Join Date
    Nov 2004
    Posts
    34
    thanks!
    this helps a lot!

    I think I'm getting there!

Page 1 of 2 12 LastLast

Similar Threads

  1. How to adjust boot list in the BIOS Setup
    By fredolin in forum Hardware & Booting
    Replies: 1
    Last Post: 05-24-2005, 10:10 PM
  2. LILO Setup
    By cyberoidx in forum Hdd Install / Debian / Apt
    Replies: 1
    Last Post: 04-03-2005, 04:56 AM
  3. Lilo setup improperly on multi-hard drive setup, how to fix?
    By Kethinov in forum Hdd Install / Debian / Apt
    Replies: 4
    Last Post: 12-21-2003, 10:23 PM
  4. how to setup dual boot
    By tungcit in forum Hardware & Booting
    Replies: 3
    Last Post: 11-22-2003, 07:37 PM
  5. Boot cd with lilo or grub boot disk
    By keava in forum General Support
    Replies: 3
    Last Post: 10-20-2003, 05:24 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
  •  


IBM System X 3250 M5 Single Xeon Quad Core E3-1220 v3 @3.1GHz,8GB RAM,Linux SUSE picture

IBM System X 3250 M5 Single Xeon Quad Core E3-1220 v3 @3.1GHz,8GB RAM,Linux SUSE

$199.87



Dell PowerEdge R730xd Server 2.60Ghz 32-Core 64GB 800GB SSD Debian Linux picture

Dell PowerEdge R730xd Server 2.60Ghz 32-Core 64GB 800GB SSD Debian Linux

$836.80



POGO Linux WEBWARE 1150 Rack-Mount Server Pentium 4 2.8GHz 512MB - No Drives picture

POGO Linux WEBWARE 1150 Rack-Mount Server Pentium 4 2.8GHz 512MB - No Drives

$179.99



1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports picture

1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports

$149.00



2 x HP ProLiant BL460c (447707-B21) Blade Servers No RAM No HDD picture

2 x HP ProLiant BL460c (447707-B21) Blade Servers No RAM No HDD

$30.00



IBM CS821 20-Core 2.827GHz 128Gb 1.92Tb SSD 1U Linux Server - 8005-12N Power 8 picture

IBM CS821 20-Core 2.827GHz 128Gb 1.92Tb SSD 1U Linux Server - 8005-12N Power 8

$449.96



Red Hat Enterprise Linux 5 Server - New and Sealed picture

Red Hat Enterprise Linux 5 Server - New and Sealed

$16.99



PFSENSE 15

PFSENSE 15" Depth Server Router Firewall Supermicro X11SSH-F E3-1240 V5 32GB RAM

$382.00



32GB Web HTML HTTP Server, Great tool for eBay seller & kids to host web site picture

32GB Web HTML HTTP Server, Great tool for eBay seller & kids to host web site

$229.99



1U Open Source Router Firewall X10SLH-N6-ST031 E3-1270 V3 6x 10GB Ethernet 16GB picture

1U Open Source Router Firewall X10SLH-N6-ST031 E3-1270 V3 6x 10GB Ethernet 16GB

$419.00