Install multiple OS Without Cds


Results 1 to 7 of 7

Thread: Install multiple OS Without Cds

  1. #1
    Join Date
    Jan 2007
    Posts
    4

    Thumbs up Install multiple OS Without Cds

    Please keep in mind that there are many different ways to achieve this same result using various loop and ramdisk methods, read this with a separate window to jot down your comments and suggestions... this is ongoing for me so any help would be appreciated!

    This is my first post and I plan on making this topic an official HOWTO with www.tldp.org.

    NOTE: This article is brief compared to the full-length version


    I have been into the computer security scene since 1990, but I realized that I had very little experience with the various LInux, Unix, and alternative Operating systems out there.

    I have a CD-RW drive but being a struggling computer security researcher I had no money for blank cd-recordables. What follows is how I managed to install various operating systems on my computer (1 hard drive) without having to burn to a CD the ISO and then boot from that.

    I first partitioned my 120GB harddrive into 10 partitions, the 2nd partition is a small swap and the last partition is extra large because it holds all the ISO images..

    I then wrote a small shell script to automatically download (I love wget!) the following.

    OpenBSD
    IpCOP
    Libranet
    Arch-Linux
    Fire
    Local Area Security
    Packet Master
    Devil-Linux
    FreeBSD
    Knoppix
    Helix
    Gentoo
    Yoper-Linux
    NetBSD
    RedHat
    Slackware

    The script also downloaded Installation manuals and md5 checksums.. (let me know if I should post... its pretty unsophisticated

    I installed Slackware (personal favorite) on hda1 using my last blank CD-R, note that I do not have a separate boot partitino. (Should I?). I also installed grub on the MBR. I love grub, if you read through the man pages and all info you can find about grub, you can learn a whole lot. Grub has much more features and capability than lilo, even though lilo comes installed by default with slack.

    I organize my kernel situation as follows... In my /boot directory, I mkdir KERNEL, CONFIG, MAP, INITRD and that is a good way for me to keep my kernels and everything organized.. Another good way is a separate dir for each new kernel.

    Since Arch-Linux is a solid distro, I'll use that as a first example.

    Here is the Arch-Linux section of my shell script
    Code:
    ######################################################
    goge Arch-Linux
    $w http://puzzle.dl.sourceforge.net/sourceforge/archlinux/arch-0.6.iso
    $w http://unc.dl.sourceforge.net/sourceforge/archlinux/arch-0.6.md5sum
    $w http://www.archlinux.org/docs/en/guide/install/arch-install-guide.html
    md55
    cat arch-0.6.md5sum
    md5sum arch-0.6.iso
    md55
    #######################################################
    The first thing to do is to mount the downloaded ISO image so we can use it as if it were an actual CD.

    mount -t iso9660 -o ro,loop=/dev/loop0 cdimage /mnt/cdrom

    Where cdimage= the ISO image. EX. /usr/local/src/ISO/Linux/Arch-Linux/arch-0.6.iso

    This mounts the iso as /mnt/cdrom.



    Next you need to copy /mnt/cdrom to a separate partition for the booting process. So mkfs.ext2 /dev/hda9. ( I prefer reiserfs or even XFS to ext but if you use something other than ext2 you could run into some problems because some of the installation kernels and initrds don't include support for reiserfs and so can't recognize the files. Although you could use mkinitrd to create a new initrd with reiserfs support, that might be pushin it IMO... I use the 9th partition consistently for this. I know there is a "right" way to copy the /mnt/cdrom files so everything stays the way it is supposed too, using tar or cpio, but I'm lazy so I just do cp -rp.
    (What is the tar or cpio commands to copy with correct permissions etc??)
    So you mount the 9th partition as whatever, say /mnt/hd and then copy the files. Now what?

    Now edit your /boot/grub/menu.lst file to include the specific options to boot arch-linux installation.

    A good idea is to find the isolinux.cfg file somewhere on the distro cd, this will tell you what to include in the menu.lst.

    Here is the section in my menu.lst
    Code:
    ############################################################
    title Arch Install
    	root (hd0,8) 
    	kernel /isolinux/vmlinuz load_ramdisk=1 prompt_ramdisk=0 root=/dev/rd/0  
    	initrd=/isolinux/initrd.img 
    ############################################################
    This should be self-explanatory. The root (hd0,8) is pointing to partition 9. So the rest of the commands start from partition 9.


    When you experience problems, remember you can always edit the grub boot options by typing 'e' and then edit the section. Also, a good idea is to include several variations in your menu.lst so you can easily try other ways to boot efficiently. And, remember to read up on all the installation guides that come with your distro, specifically, hard-disk installs.

    There are special cases, Gentoo, has a semi-new compressed filesystem called squashfs. BTW, this is AWESOME, so check it out. It has to be compiled into the kernel, so some work is in order, but use this recompile to optimize your kernel. You can get the squashfs patch for almost any kernel. I use the latest stable 2.6 kernel. Squashfs is incredible and although I don't think you need it to install from ISO, you do need it to expand the livecd.squashfs filesystem that comes with the cd.

    Heres a sample Gentoo section from my menu.lst
    Code:
    #############################################################################
    title Gentoo Install
    	root (hd0,8)
    	kernel /isolinux/gentoo root=/dev/ram0 
    	initrd=/isolinux/gentoo.igz init=/linuxrc acpi=off looptype=squashfs loop=/livecd.squashfs cdroot vga=791 splash=silent 
    #############################################################################
    A nother' tip is the shell that is provided if you experience problems, typically busybox or ash. The key tools to get you going from here is mount and chroot. Sometimes you will need to manually create a simulated file system and then chroot into it. For instance, you might have to create boot, etc, bin, directories on the target partition.

    I generally install each OS onto the next partition (careful of the logical partition) and add it to my menu.lst after install. A good idea is after installation, copy the kernel and initrd(if there is one) to the slackware(or whatever) boot partition on hda1. I copy kernels to /boot/KERNEL/ and initrd's to /boot/INITRD, then menu.lst is more organized...

    You then need to add an updated section to your menu.lst (just comment out the install section for later)

    Here is the finished arch-linux section from menu.lst
    Code:
    ########################################################
    title Arch Linux 6
    	root (hd0,2) 
    	kernel /boot/vmlinuz26 ro root=/dev/hdc3  
    ########################################################
    This doesn't use my convenient boot/KERNEL/vmlinuz26 as you can tell by setting the root to partition 3.

    ***NOTE: Make a backup of MBR using dd and save to floppy, also backup the partition table to floppy, using cfdisk or parted. And boot disks (I use 1 with grub, and 1 with slack, and tomsbootdisk) will invariably come in handy. Tomsbootdisk is recommended, and make the grub boot disk when you install grub. install to floppy.

    ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++

    The final result after some fun experimenting, is when I boot, I have a cool grub boot screen come up with the option to boot into whatever OS I want, this is handy for multiple reasons. One good thing to do after this is to port scan and vuln scan each OS, after you update of course. Write this stuff down and you will know the weaknesses/strengths of the various OS's.

    I can boot a custom Firewall, snort, or multiple honeypots using this procedure, as well as a graphical kde environment with a kernel optimized for graphics and my processor/architecture, or an environment devoted to forensics or even an environment suitable for programming.


    ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++

    P.S. Some of the cooler alternative operating systems are BeOS 5, EOS, ER_OS, V2_OS, and my personal favorite Menuet. Menuet is 100% assembly graphical operating system that fits on a floppy.

  2. #2
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    htaccess-file,

    A warm welcome to JL from a fellow member.

    That is a nice piece of work.

    If I could summarise the steps (to understand in my own way) then your proposal suggests

    (1) Download the iso file

    (2) Mount the iso file as a loop back device on a temporary directory /mnt/cdrom inside a Linux.

    (3) Save the content of /mnt/cdrom, which has the distro expanded in a recognisible form, into a temporary directory.

    (4) Reboot and use Grub, sourced from any other Linux, to boot up the kernal and initrd files of this temporary directory, thereby activate its installer if it has one or to conduct the installation from the fire-up GUI.

    Technically speaking that is a perfect match. You simply unpack/convert the iso image in a Linux partition, use an existing Grub at a stage prior to an operating system has been booted, "replace" the function of isolinux (although Grub is starting to appear in many CD now) which would be needed if the distro is booted from a CD and fire up the distro to be installed.

    I shall definitely give it a try as I can't wait toi see the reaction of some Live CD providers deliberately withdrawing the installer making their distros only usable on a CD. One distro I got in mind is Linspire because they want the users to pay for installing it onto a hard disk. Your way is half way house as the distro still needs to go through an installation procedure each time it is used but at least the Linux can run faster on a hard disk than on a CD. Other installable distros of course have no such hang up.

    One minor refinement, if that can be called as such, is there is no need to edit Grub's menu.lst if you do not want to. Just press "c" key can drop into a Grub prompt, then ask Grub to find out the loaction of the kernel and initrd for you, say to "cat" the isolinix.cfg, and fire up the distro "manually" using information displayed by Grub.

    Also for those having an interest in omitting burning a CD to install a distro the current VMware can accept distro installation directly from an iso image too.
    Last edited by saikee; 01-05-2007 at 10:45 AM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  3. #3
    Join Date
    Jan 2007
    Posts
    4
    Hey thanks saikee, that is a surprisingly excellent summary, I originally wrote this article back in 2004, and there is actually more info that you might be interested in here.



    There are special cases when I had to use Grub, for Gentoo with Squashfs.
    Gentoo, has a semi-new compressed filesystem called squashfs. BTW, this is AWESOME, so check it out. It has to be compiled into the kernel, so some work is in order, but use this recompile to optimize your kernel. You can get the squashfs patch for almost any kernel. Squashfs is incredible and although I don't think you need it to install from ISO, you do need it to expand the livecd.squashfs filesystem that comes with the cd.

  4. #4
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    htaccess-file ,

    I had a limited success with your proposed scheme. It seems a lot is dependent on how the distro has been put together.

    My major obstacle is on booting the iso file the installer keeps going back to search files from the CD. As the iso image has been expanded on the hard disk partition, as in Partition hda9 in your case, I could not find a way to persuade the installer to look at the hard disk directory instead.

    Just wonder if you come across it or have a way to get over it?
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  5. #5
    Join Date
    Sep 2003
    Location
    Rochester, MN
    Posts
    3,604
    I don't think he's going to be replying. He got banned because all of his posts were advertising for his site.

  6. #6
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    You know if this scheme works we can put all the Live CD into the hard disks.

    And some of them can!

    On this banning thing I recently joined another forum and the moderator deleted my signature because it was considered advertising for JustLinux.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  7. #7
    Join Date
    Sep 2003
    Location
    Rochester, MN
    Posts
    3,604
    Yeah, the thing is that spammers are getting more and more subtle - some of them recently haven't even posted links but their username itself is an advertisement which makes it very hard to draw the line between someone who innocently posts links and someone who is spamming. This guy was a new user posting links to a site with ads (thus making it commercial) and that's not allowed. If people want to advertise their sites on JL they can pay for ad space just like Microsoft.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •