Installation:No CD
(→Usb bootable lunar) |
(→Usb bootable lunar) |
||
Line 82: | Line 82: | ||
− | ===Usb bootable lunar=== | + | ===Usb bootable lunar (old way, pre 1.6.5)=== |
root@morholt ~ # mkdosfs -F 16 /dev/sda1 | root@morholt ~ # mkdosfs -F 16 /dev/sda1 |
Revision as of 17:10, 23 August 2010
Installing Lunar-Linux without a CD drive or other removable media isn't really that hard. There are several ways of emulating a cd-rom with linux. There's some easy ways and some hard ways. I'll try to discuss all of them.
Disclaimer: The methods below might destroy all your data and not work for you at all. Make backups! You yourself are responsible for your own data and system!
Contents |
Booting the ISO from a hard disk partition
Yes, I'm not kidding. This is by far one of the easiest methods. The idea behind this method is that you can boot the ISO from any media, all you need to do is boot from it. If that means that the ISO is somehow written on your hard disk, and you have a bootloader capable of booting boot sectors (like lilo, grub, windows all can do), then you're in business.
requires:
- Enough free disk space plus partition big enough for the iso image
- Any installed operating system and tools that allow directly to write to a partition
- A working boot loader like windows' bootloader, lilo or grub
Your best bet is to free some space at the end of your disk. Make sure this is larger than the lunar iso (somewhere around 350mb). Create a partition and copy the contents of the iso to that partition:
cat lunar-1.5.1-i686.iso > /dev/hda15
Once done, you should edit your bootloader (be it windows or grub or lilo) and make it boot the boot sector of the iso. Here's the lilo entry you would need:
other = /dev/hda15 label = lunar-1.5.1
That's it! reboot and select the iso entry, and you're ready to go! The lunar installer should start and everything should work just as good as from a CD!
Chrooting into the ISO
Installing from 2.4 kernels with devfs support
If the above method fails, you can always manually chroot into the ISO and start the installer manually too.
requires:
- A running linux installation with relatively new 2.4 kernel that has devfs support and allows chroot usage (must be root)
This method is a bit trickier since you will be repartitioning your hard disk from which you just have booted, so you should actually install a small linux installation somewhere near the end of your disk, losetup/loopmount the iso on there, and then install to partitions that are NOT active/mounted. This might even fail since the kernel doesn't like changing partitions when it's running.
So, start out by getting your 'tiny' linux running anf booting. Preferably install it at the end of your hard disk and re-partition the beginning of your hard disk already for the lunar installation. Reboot your system so the partitions are known by the kernel, and prepare to mount the ISO over loop:
losetup /dev/loop0 lunar-1.5.1-i686.iso mount /dev/loop0 /mnt -o ro chroot /mnt /sbin/lunar-install
that's it! The installer should run and you can perform all steps necessary for installing lunar on the remaining partitions. At the end, make sure you don't accidentally overwrite your bootstrap linux installation so you can fallback to it. Beware that you might want to add the bootstrap bootloader info too, in case you want to boot that installation if something goes wrong. Once lunar installs succesfully, you can remove this partition of course.
Installing from 2.6 kernels with udev support
This is something different
When the previous installation methods fail this is one you can ry as well:
A more up-to-date method for 2.6 kernels with udev was outlined on #lunar (for installing from Debian?):
root@rescue ~ # wget http://download.lunar-linux.org/lunar/lunar-1.6.1-i686.iso.bz2 root@rescue ~ # bunzip2 lunar-1.6.1-i686.iso.bz2 root@rescue ~ # mkdir tmp root@rescue ~ # mount lunar-1.6.1-i686.iso -o loop -t iso9660 tmp root@rescue ~ # cp -R tmp/* /tmp/ root@rescue ~ # cp -R tmp/.packages /tmp/ root@rescue ~ # cp -R tmp/.lunar-cd /tmp/ root@rescue ~ # cd /tmp/ root@rescue /tmp # mkdir -p proc && mount -t proc proc ./proc root@rescue /tmp # mkdir -p dev && mount -o bind /dev ./dev root@rescue /tmp # mkdir -p dev/pts && mount -t devpts devpts ./dev/pts root@rescue /tmp # cd dev root@rescue /tmp/dev # ln -sf /proc/self/fd root@rescue /tmp/dev # ln -sf fd/0 stdin root@rescue /tmp/dev # ln -sf fd/1 stdout root@rescue /tmp/dev # ln -sf fd/2 stderr root@rescue /tmp/dev # rm null root@rescue /tmp/dev # mknod null c 1 3 root@rescue /tmp/dev # cd
root@rescue ~ # chroot /tmp /sbin/lunar-install
Version numbers obviously change over time, so please check the steps above before you begin.
Usb bootable lunar (old way, pre 1.6.5)
root@morholt ~ # mkdosfs -F 16 /dev/sda1 mkdosfs 2.11 (12 Mar 2005) root@morholt ~ # mkdir /mnt/stick root@morholt ~ # mkdir /mnt/iso root@morholt ~ # modprobe loop root@morholt ~ # mount lunar-1.6.4-beta1-i686.iso -o loop /mnt/iso root@morholt ~ # mount /dev/sda1 /mnt/stick root@morholt ~ # cp -R /mnt/iso/isolinux /mnt/stick/syslinux root@morholt ~ # rename isolinux syslinux /mnt/stick/syslinux/isolinux* root@morholt ~ # ls /mnt/stick/syslinux/ boot.cat f2.txt f4.txt initrd memtest safe syslinux.cfg f1.txt f3.txt generate-iso.sh linux readme syslinux.bin root@morholt ~ # cp ~samuel/lunar-1.6.4-beta1-i686.iso /mnt/stick/ root@morholt ~ # syslinux /dev/sda1 root@morholt ~ # fdisk -l /dev/sda Disk /dev/sda: 1027 MB, 1027603456 bytes 255 heads, 63 sectors/track, 124 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sda1 * 1 125 1003464 b W95 FAT32 Partition 1 has different physical/logical endings: phys=(1023, 254, 63) logical=(124, 236, 63) # following step installs an mbr on the usbstick. Pay attention you need the stick, not the partition on the stick! root@morholt ~ # dd if=/usr/share/syslinux/mbr.bin of=/dev/sda # if you want you can install the module mbr to do the same for you (root@morholt ~ # install-mbr /dev/sda) NOT NEEDED IF YOU DID THE DD!!