[Sussex] Linux dual boot
John D.
john at johnsemail.eclipse.co.uk
Wed Aug 31 13:29:11 UTC 2005
Alan Pope wrote:
>On 31/08/05, Gavin Stevens <starshine at gavmusic.uklinux.net> wrote:
>
>
>>A while ago, I set up a Windows/Ubuntu dual boot on my partner's PC.
>>This was fairly easy to do & worked first time.
>>
>>
>>
>
>Most modern Linux distros can cope with being installed side-by-side
>with something else, which is good news for dual-booters.
>
>
>
>>On my own second PC, I decided to try a dual boot of Debian Sarge &
>>CentOS 4.1. Perhaps naively, I thought it would be relatively easy to
>>achieve. This has not been the case: I made a partition for CentOS when
>>I installed Sarge. The CentOS partition had a mount point of "/centos",
>>but CentOS was not impressed with this when I came to install it. It
>>said it needed a "/" directory in order to know where to install itself.
>>
>>
>>
>
>Right, that's where you went wrong. A disk can be carved up into
>partitions, up to 4 primary ones (hda1 through hda4 for example on the
>primary master IDE disk) and some extended ones (usually starting at
>hda5 for primary master IDE disk). What you put in them is up to you,
>but if you want multiple Linux distros that's going to be a minimum
>requirement - multiple partitions.
>
>Once the disk is carved up (not forgetting some space set aside for
>swap) using whatever disk partitioning tool you choose - cfdisk,
>fdisk, parted, disk druid or whatever, you then need to choose what
>mount points are going to go *in* those partitions. For the absolutely
>simplest of installations of Linux you can get away with "/" - the
>root mount point being one partition - say /dev/hda1 for example, and
>the swap being maybe /dev/hda5.
>
>You could get more fancy and have separate paritions setup for mount
>points such as one for /home, one for /var, another for /usr and a
>further one for /boot, all in addition to the one you already created
>for /. You don't have to do this, and for the beginner it can be
>easier to just have one partition for / and be done with it. I'm
>guessing this install you're doing wont be a long term solution, but
>will be a play thing, so you could install multiple times using
>different partitioning setups.
>
>The crucial thing to note is that one linux distro will need a /, and
>so will another that you install. So you could for example create
>/dev/hda1 of 2GB, and /dev/hda2 of 2GB also. One could be / for
>debian, the other could be / for centos. Two separate partitions into
>which the different distros are installed, keeping all their files
>separate. The only bit of disk they'd share would be the swap and the
>boot loader.
>
>
>
>>Presently, I have the partitions set up like this:
>>
>>/dev/hda1 / primary, bootable
>>/dev/hda3 /1 primary
>>[/dev/hda2 extended]
>>/dev/hda5 /home
>>/dev/hda6 swap
>>
>>
>
>Ok, really the hda3 and hda1 should both be /, there's no such thing
>as /1 really. This is a common mistake made by Windows veterans who
>are used to having to use folders to organise stuff. Now there's the
>extra level of partitions above that, it makes things a bit more
>complicated, but not too much.
>
>
>
>>/dev/hda3 has been renamed "/1" after having to re-install Debian (at
>>which point, I deliberately wiped the CentOS install, leaving that
>>partition ready to have another go).
>>
>>
>>
>
>Hmm. I'm not sure I follow, but I am sure that lots of the confusion
>lies with the /1 stuff. It just plain shouldn't be there. All the
>linux installs on this box - however many you have, should all have a
>/ - wherever that partition is.
>
>
>
>>Before I get into questions about GRUB (actually, I'm not confused about
>>GRUB), I need to establish the correct way to install the two distros,
>>plus any alterations to the partitions that could be helpful (if it is
>>possible to do this on one HDD).
>>
>>
>>
>
>If you're starting with a blank disk then the first distro you install
>will guide you through partitioning, just make sure you leave some
>empty space - or indeed create an extra partition for - the next
>install you'll do later of the "other" distro. When you come to
>install the next distro make sure you tell it to install in the
>"other" partition for its /.
>
>You may have issues with GRUB not "seeing" the first distro install
>when you install the second one. It's not really "normal" to have
>multiple installs of linux on a box, although supported, and it will
>work just fine, it's a bit "odd" IMO. I know that last sentence is
>going to get lots of "I dual boot multiple distros, what are you
>talking about?" but I shall ignore them.
>
>
>
>>I only have the one HDD in the second PC, but if a second drive is
>>adviseable, then I can easily get one from work.
>>
>>
>>
>
>No, should't be needed, so long as the one you have is big enough for
>a) a / part for one distro, b) a swap part for both distros to share,
>c) a / part for the second distro. A few gig should be enough for a
>minimal install of two distros, any bigger than that and you can have
>fun with X/Gnome/KDE/etc too if the machine is up to it and you're
>interested in it.
>
>
>
>>Finally, just to re-iterate that all of the above is taking place on my
>>second PC, which I built especially for learning & experimenting. So I
>>can re-format, re-install etc. as necessary without any fear of data
>>loss.
>>
>>
>>
>
>Personally, given what you've said, I'd start again. Plan out the
>partitioning schema on paper first, as I outlined above.
>
>
>
>>Some may ask why I am bothering to attempt this at all: It is purely for
>>learning purposes. It does have a possible link in to my planned
>>"non-techie" presentation at a moot, but I have a strong desire right
>>now to get my hands dirty with Linux & know a lot more.
>>
>>
>>
>
>Hey, there's nothing wrong with trying stuff out, it's the absolute
>best way to learn.
>
>
>
>>I have already learned one thing: It is easier to set up a Windows/Linux
>>dual boot than it is to do a Linux/Linux dual boot.
>>
>>
>>
>
>I'll not comment on that for fear of casting aspertions on your
>partitioning schema. :D
>
I'd add that last time I had multi boot, similar to this, it was
windows/mandrake/debian followed by windows/mandrake/gentoo - Steve D.
kindly helped me set up the first version, and I managed to sort the second.
I had it set up as:
/dev/hda1 - /boot
/dev/hda2 - /windows
/dev/hda3 - /swap
/dev/hda4 was extended into->
/dev/hda5 - / (mandrake)
/dev/hda6 - / (debian, then gentoo)
/dev/hda7 - /home
As far as I can recall, I just had to make sure that the /boot knew
where to find the various files i.e. that it had the differing kernels
and initrd etc and that the options were listed in the bootloader (at
the time I was using Lilo). Steve did set up the debian and mandrake so
that both distros would have mounted each other so I could look at
either (from whichever I was logged into), but I screwed that up when I
changed the 3rd OS to gentoo, as at the time I didn't really know what I
was doing (still don't, so theres nothing new there :D).
I made sure that the same apps where installed so that they'd start from
the common /home. It seemed to work well. I can't remember why I changed
it back to a normal dualboot, but thats all history now as I only run
gentoo on this system.
Thats just my tuppence worth. Not that it really matters, because Alan
has explained it in a far superior way that I could have done - well
done that man!
regards
John D.
More information about the Sussex
mailing list