Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 26 Nov 2014, 11:27
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How To - Lilo!
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count_1  
Author Message
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Mon 10 Sep 2012, 20:34    Post_subject:  How To - Lilo!
Sub_title: boot puppy frugally from lilo, updated
 

pizzasgood first (as far as I know) did a how to use Lilo to boot puppy frugally here. That info is still basically relevant but some things are obsolete. I will attempt to update that info here.

Why?

This guide is only useful if you have lilo already installed.

On one of my machines, Slackware is the main OS, it also has XP and Puppy, Currently, I have Slackware current installed and it is undergoing heavy development with the imminent release of Slackware-14.0. To keep up with the changes through the betas and RCs one has to run a series of commands using a slackware tool named slackpkg. This allows updating of the system and often Lilo needs to be reinstalled, wiping out the MBR and to boot puppy I need to either reinstate the MBR or run grub/grub4dos. It's a pain. So I decided to add Puppy to Lilo, that way Puppy boots after Lilo has done it's thing.

It doesn't have to be slackware, any distro that uses lilo as the boot loader will work the same.

Begin

WARNING: Proceed at own risk. If you make a mistake you may do damage to your other Linux install. TIP: Backup before you begin

First, we will assume that you are happy with the partitioning of your drive and that Puppy will be on a separate partition to your other Linux. If you already have a frugal you want to boot with lilo then skip the parts where you have to mount a CD/iso image. Instead copy from the frugal subdirectory vmlinuz and initrd.gz (see step 6 Appendix).


    1.Boot into the other Linux install. For demonstration's sake we will say this is on sda1 (hda if you have an old kernel). You do not have to be running GUI as I am going to run all the commands in terminal.

    2. At the console become root (superuser). If you don't know how to do this please do not attempt this because you can make your system unbootable if you are not careful. Typo's are no excuse.

    3. Insert a puppy CD into the CD drive and mount it. You can use just an iso image too. Just replace /dev/sr0 with /path/to/puppy.iso
    Code:
    mkdir -p /mnt/pupcd #creates mount point
    mount -t iso9660 /dev/sr0 /mnt/pupcd -o loop #sr0 is the drive, may also be cdrom, sr1 etc
    You may get a warning about it being read only, ignore it.

    4. Mount the target partition and make a directory for the puppy files. For this example we assume sda2.
    Code:
    mkdir -p /mnt/target #makes mount point
    mount -t ext4 /dev/sda2 /mnt/target #you will have to specify your own fs, ext2, 3, 4 etc


    5. Make a target directory on the target partition for the puppy files, name it what you will, I'll call mine pupfrugal.
    Code:
    mkdir /mnt/target/pupfrugal


    6. Copy the files from the CD to the target directory. At this point we can make a choice. Copy the lot or copy what's needed. Easy, copy the lot:
    Code:
    cp -a /mnt/pupcd/* /mnt/target/pupfrugal  #takes a minute or so

    or copy what's needed. Strictly, vmlinuz and initrd.gz shouldn't need to be copied, but if you get tired of lilo you can easily revert to grub by copying them.
    Code:
    ls /mnt/pupcd #just so you know what filenames to copy
    cp -a /mnt/pupcd/vmlinuz /mnt/target/pupfrugal
    cp -a /mnt/pupcd/initrd.gz /mnt/target/pupfrugal
    cp -a /mnt/pupcd/puppy_main_XXX.sfs /mnt/target/pupfrugal #this is what ever the main sfs is
    #optional if you have a zdrive
    cp -a /mnt/pupcd/zdrv_main_XXX.sfs /mnt/target/pupfrugal
    # make the marker file
    touch /mnt/target/pupfrugal/ATAHD

    We also have to put some files where lilo can find them. They need to be on the main Linux OS partition. We will make a directory to put them in. It can be whatever you want, even on the top level but I think that's untidy. We'll put the files in /boot in a subdirectory.
    Code:
    mkdir -p /boot/puppy
    cp -a /mnt/pupcd/vmlinuz /boot/puppy
    cp -a /mnt/pupcd/initrd.gz /boot/puppy
    DO NOT install them directly to /boot!

    Appendix 6. If you have already a frugal you want to add to Lilo you can mount it and add the vmlinuz and initrd.gz to /boot/puppy
    Code:
    mkdir /mnt/frugal #make mount point
    mount -t ext4 /sda2/myfrugalpup /mnt/frugal #replace sda2 and myfrugalpup with your partition number and frugal subdirectory
    cp -a /mnt/frugal/vmlinuz /boot/puppy
    cp -a /mnt/frugal/initrd.gz /boot/puppy
    umount /mnt/frugal #cleanup
    rm -r /mnt/frugal


    7, Puppy is now installed, we just have to tell Lilo where it is. At this point we cleanup by unmounting everything and deleting mount points.
    Code:
    umount /mnt/pupcd
    umount /mnt/target
    rm -r /mnt/pupcd
    rm -r /mnt/target
    eject #ejects CD, may need -t option, depends on HW, version of eject etc


    8. Open /etc/lilo.conf in a text editor. I'll use nano but you could use vi, emacs, whatever. We are going to append the details for booting puppy. At the bottom of the file put a comment:
    Code:
    #Puppy install -start
    Then you need to point to the kernel image
    Code:
    image = /boot/puppy/vmlinuz
    then point to initrd.gz
    Code:
      initrd = /boot/puppy/initrd.gz
    then the label that appears in Lilo at first boot
    Code:
      label = PuppyLinux
    then the target partition where you installed all the puppy files
    Code:
      root = /dev/sda2
    now the kernel line, with the quotes, and you can add other stuff if you need to, but the psubdir is absolutely necessary
    Code:
      append = "psubdir=pupfrugal"
    then lastly
    Code:
      read-only
    and close out with a comment
    Code:
    #Puppy install -end

    All up it should look like this:
    Code:
    #Puppy install -start
    image = /boot/puppy/vmlinuz
      initrd = /boot/puppy/initrd.gz
      label = PuppyLinux
      root = /dev/sda2
      append = "psubdir=pupfrugal"
      read-only
    #Puppy install -end

    Save it!
    NOTE: of course if you already have a frugal and are just adding it use your directory and partition names!

    9. Update Lilo! We're almost ready. We just need to run lilo to update it. We'll use the -v (verbose) option.
    Code:
    lilo -v


    10. That's it! Reboot.


End

Puppy will be in the menu at reboot and will hopefully boot. Just check everything is ok with the other OS on boot and you should be all good.

Changes

V2: added extra info for existing frugal install
lilo_howto-V2.rtf.tar.gz
Description  Printable document in Rich Text Format, 4 pages
gz

 Download 
Filename  lilo_howto-V2.rtf.tar.gz 
Filesize  4.07 KB 
Downloaded  160 Time(s) 

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0671s ][ Queries: 12 (0.0037s) ][ GZIP on ]