Click to See Complete Forum and Search --> : A Challenging Install Scenario
SunTzuWarmaster
06-26-2007, 11:04 PM
Okay, I have a challenge (that I am working on, help is appreciated):
Here is the situation:
I have a x86_64 style laptop (all the rage 5 years ago... with 32bit XP) with:
- 1 hard drive (40gb)
- no floppy
- CD-R drive
and a External Hard Drive (recently purchased, 500gb).
My goal is this:
Situation 1 - External Hard Drive is not plugged in - boot into windows
Situation 2 - External Hard Drive is plugged in - boot into Linux
I cannot resize my windows partition, it is full and I need EVERYTHING on it to work properly (masters degree + part time job depend on it).
Obviously, I have enough space on the external (USB) drive to put a proper Linux (Ubuntu for my first time) installation on it. However, this drive leaves to go to the other person that payed for it daily, so I need to be able to boot into windows when it is not around (or when I need to work with Matlab/MultiSim). It would seem that GAG would be the perfect solution, saving that I do not have the floppy drive (and cannot obtain one, see: poor college student).
Perhaps there is a way to get the Windows bootloader to recognize Linux (when it is plugged in)?
je_fro
06-26-2007, 11:47 PM
Please read the posting guidelines...do NOT try and hijack someone else's thread.
IsaacKuo
06-27-2007, 10:46 AM
The solution is pretty easy. Just install Ubuntu with the external drive plugged in--making absolutely positively sure that you're installing on the external drive and not your internal drive (obviously!).
By default, the installer will want to install the grub bootloader on the same drive as the OS is installed (the external drive). In other words, it won't even touch your internal drive at all.
Now, the "magic" part which lets the computer do what you want is setting up the BIOS properly. You'll want to set up the boot order so that it first tries to boot from an external hard drive before trying to boot from the internal drive. The exact way to do this will vary from BIOS to BIOS, but pretty much any BIOS capable of booting off a USB drive should have the necessary settings for defining boot order.
Done this way, the Windows installation will be completely unaware of the Linux installation. With the external drive disconnected, the computer will simply boot up normally with a pure Windows setup.
The Linux installation will be entirely contained on the USB drive, but it will be aware of the Windows install. The bootloader will include a menu where you can choose which operating system to boot up. With the USB drive attached, you can boot into either Linux or Windows.
saikee
06-27-2007, 03:21 PM
IsaacKuo has give more or less the essential steps.
I have done it before and wrote this thread (http://www.justlinux.com/forum/showthread.php?t=148499&highlight=external) which concentrated on getting as many distros into the external disk.
To cover your need I would lay out the steps as follow
(1) Hook up the external hard disk and tell the Bios to boot CD drive 1st, external had disk 2nd and the internal Windows disk 3rd.
(2) Place the Linux CD and boot it up. I recommend a Live installable Linux like Ubuntu family, Knoppix family, Mepis etc.
(3) Type "fdisk -l" at terminal to ensure the 500Gb disk is sda1 and the other disk with 40Gb is hda (as it is 5 years old and Sata wasn't widely available then).
(4) Type "grub" (or "sudo grub" if it is Ubuntu) and then "geometry (hd0)" followed by "geometry (hd1)" to make it bomb proof the first disk (hd0) is one with 500Gb and has no partition inside. You should then be absoluely certain that you don't do anything to touch the 2nd disk (hd1) to safe guard its content.
(5) Use the cfdisk program to partition the first disk sda by command "cfdisk /dev/sda"
(6) As the 3rd line of defence make absolutely water tight that you have 500Gb to start and there isn't any partition in the disk you are partitioning with. Once happy create one primary partition sda1 of size of your choice. I would use 10 to 100Gb depending on the need. I then create another primary partition sda2 size 1Gb for swap. To make it a swap you highlight "type" and select partition type no. 82. I then highlight "write" answer "yes" to write the partition table, quit and reboot the computer.
(7) On a reboot I click the icon in the desktop to install the distro. I will watch the installer like a hawk to make sure it use sda1 and sda2 for the installation. Depending on the distro the idea is you edit sda1 for mounting the root "/" of the Linux and format in in say ext3 filing system. Every installer knows what to do with the swap partition.
(8) When it come to boot loader installation you select MBR because it will be in the first sector of the External disk because it is (hd0).
(9) When the installation complete you will find booting to the Linux.
(10) Remove the USB hard disk and you go back to Windows same as before.
(11) If you want to boot to Windows while the USB external disk is still attached add these lines to the Linux's /boot/grub/menu.lst
title Windows in the 2nd disk (hd1) booted as 1st disk (hd0)
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1 Item (11) is for you to use Windows without deteaching the USB hard disk.
Not much a challenge really. Just a straight installation make sure what each system supposed to do.
Sorry for the long wind approach but this is because I am using Item (3), Item (4) and Item (6) as 1st, 2nd and 3rd lines of defence to make sure you don't damage your Windows disk accidentally. Item (11) is just icing on the cake. Since another has already answered your need I think there is no harm throwing in a few details, including this one
"Welcome to JustLinux".
IsaacKuo
06-27-2007, 03:26 PM
Don't current versions of Ubuntu use sda/sdb/etc for all hard drives?
saikee
06-27-2007, 03:32 PM
IsaacKuo,
Good point but it may still call the old disk hda depending on how new the distro. I have Ubuntu on both cases. I think I have thrown in sufficient pointer not to mix up the two disks.
The new naming hard disk convention has gone crazy as I got DSL calling the only Sata as hda, which going exactly the opposite direction of the new kernel. That distro uses damn old kernel of 2.4.26!