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.isoYou may get a warning about it being read only, ignore it.Code: Select all
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
4. Mount the target partition and make a directory for the puppy files. For this example we assume sda2.5. Make a target directory on the target partition for the puppy files, name it what you will, I'll call mine pupfrugal.Code: Select all
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
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: Select all
mkdir /mnt/target/pupfrugal
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: Select all
cp -a /mnt/pupcd/* /mnt/target/pupfrugal #takes a minute or so
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: Select all
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
DO NOT install them directly to /boot!Code: Select all
mkdir -p /boot/puppy cp -a /mnt/pupcd/vmlinuz /boot/puppy cp -a /mnt/pupcd/initrd.gz /boot/puppy
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/puppy7, 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: Select all
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
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: Select all
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
Then you need to point to the kernel imageCode: Select all
#Puppy install -start
then point to initrd.gzCode: Select all
image = /boot/puppy/vmlinuz
then the label that appears in Lilo at first bootCode: Select all
initrd = /boot/puppy/initrd.gz
then the target partition where you installed all the puppy filesCode: Select all
label = PuppyLinux
now the kernel line, with the quotes, and you can add other stuff if you need to, but the psubdir is absolutely necessaryCode: Select all
root = /dev/sda2
then lastlyCode: Select all
append = "psubdir=pupfrugal"
and close out with a commentCode: Select all
read-only
All up it should look like this:Code: Select all
#Puppy install -end
Save it!Code: Select all
#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
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.10. That's it! Reboot.Code: Select all
lilo -v
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