Installing lunar without CD burner

Auke Kok koka at
Wed Jul 17 01:30:57 GMT 2002

csm: better post this? on the website!


On Wed, 2002-07-17 at 01:19, Antti Sykari wrote:
> On Tue, Jul 16, 2002 at 09:59:12PM +0200, Jasper Huijsmans wrote:
> > Hello list,
> > 
> > I'd like to try Lunar linux, but I don't have a CD burner. Is it
> > possible to install Lunar without starting from CD? I would guess yes.
> > Has anyone tried that? 
> I did that, successfully.  "How" follows:
> ---
> Suppose you don't have a CD-ROM drive or an installation ISO available, but
> you want to turn your existing linux installation into Lunar-Linux.
> This will practically mean wiping out whatever you have left of your
> current distribution and starting over with the new one.  Here's what
> you need:
>   - One hard disk partition with enough space to hold the contents of
>     the installation ISO.  Also you can't install to this partition; two
>     separate hard disks are a good idea.
>   - Loopback device support in your kernel (for copying the contents if
>     of the ISO to the partition)
> 0. Of course, as always when you're installing something, back up
> whatever important you have on your hard disk.
> 1. Copy the contents of the ISO to your temporary partition.  For
> example, I wanted to install Lunar on the first disk (/dev/hda), and
> used an empty 300-meg ext2 partition /dev/hdb4 to contain a copy of the
> ISO during the installation.  The procedure went like this:
> ...
> -rw-r--r--    1 root     root     161546240 May 29 01:37 lunar-20020503.iso
> golem:/tmp# mount ./lunar-20020503.iso /mnt -t iso9660 -o loop=/dev/loop0
> golem:/tmp# mount /dev/hdb4 /mnt2 -t ext2
> golem:/tmp# cp -Rp /mnt/* /mnt2
> >From now on, we'll assume that you've mounted the ISO to /mnt and the
> temporary volume to /mnt2.
> 2. Next we need to boot the kernel which resides on the temporary
> partition (/mnt2/isolinux/linux), and mount the file
> (/mnt2/isolinux/initrd.gz) as the root file system.  We can do this with
> lilo.  Create a temporary lilo.conf.tmp which contains the following:
> --begin /tmp/lilo.conf--
> boot=/dev/fd0
> vga=normal
> image=/mnt2/isolinux/linux
> label=lunar-install
> ramdisk=8192
> initrd=/mnt2/isolinux/initrd.gz
> root=/dev/ram0
> --begin /tmp/lilo.conf--
> This one will make a boot floppy disk which will boot into your newly
> born temporary install disk.  If you wanted to boot straight from your
> hard disk, you could use boot=/dev/hda (which installs on the MBR of the
> first disk), but it will of course wipe your current boot sector.  I did
> it and got problems - use with caution ;)
> Then run lilo to write the boot sector to the floppy:
> root at golem:/tmp# lilo -C ./lilo.conf
> Warning: LBA32 addressing assumed
> Added lunar-install *
> root at golem:/tmp#
> 3. Not so fast! Don't reboot yet. The installation is (as of the time of
> writing this, at least) configured to run the file
> /usr/sbin/lunar.install if it is booted on a read-only device (such as a
> CD-ROM), and to delete that file if it is booted on a hard disk.  This
> causes an unpleasant surprise to the unaware (at least to me it did ;)
> Before booting the temporary disk, you must change the file
> /mnt2/etc/init.d/lunar (which is run at the boot time) so that it won't
> delete that precious file: 
> --begin /mnt2/etc/init.d/lunar--
> if  [      -x  /usr/sbin/lunar.install  ];  then
> # comment out this line:
> #  /bin/rm  -f  /usr/sbin/lunar.install  2>  /dev/null  ||
>   /usr/sbin/lunar.install
> fi
> --end /mnt2/etc/init.d/lunar--
> 4. Now let's boot with the floppy disk.  If everything goes fine, first
> the installer will mount the initrd image as root, containing some
> kernel modules.  You should load all kernel modules which you will need
> to access your temporary hard disk, in the same manner as you would have
> to load your CD-ROM driver.  For example, if you were using /dev/sdb4
> instead of /dev/hda4 for your temporary disk, select your SCSI driver,
> etc. etc.  Most IDE ATA/100 drivers and similar are already compiled in
> the installation kernel, I think, so you don't need to take care of
> those.  When comes the time to select your root device, you should
> select the same temporary device as before, except that it is now in
> devfs-style path since the installer supports only devfs.  For example,
> if the temporary partition was /dev/hdb4 in the normal /dev system, it's
> /devices/discs/disc1/part4 now.  Go to the shell and check if you're
> unsure.
> 5. After this you can hopefully manage to continue installing as if you
> were booting from CD-ROM; the installer prompts to repartition and
> format your partitions and swap spaces, etc.  Don't wipe out your
> temporary partition yet :)
> 6. Finally, the installer lets you configure the kernel and compiles it,
> and then reboots - or alternatively lets you go to the shell to do
> whatever you want to do.  This is a good change to move the installer
> out of the way so that it won't be run again when you boot for the
> second time.  (Remember the change we made in step 3?)  Just simple
> "mv /mnt/root/usr/sbin/lunar.install /mnt/root/usr/sbin/lunar.install.old"
> will do.
> 7. If everything goes fine, you've got a fresh installation with minimal
> default settings (I had to do 'lin dhcpcd', for example, to get the
> network up).  Enjoy.
> ---
> Antti.
> P.S. After I installed my system the thought that you could install
> lunar straight from the ISO image via the loopback filesystem popped
> into my mind, but I was too lazy to reinstall my system, testing if it
> would work for real.  But you might want to try if you're brave enough
> :)
> _______________________________________________
> Lunar mailing list
> Lunar at

More information about the Lunar mailing list