Sign in with
Sign up | Sign in
Your question

Partitions and boot menu

Last response: in Linux/Free BSD
Share
June 19, 2011 9:21:57 AM

Hey people, I'm new to Linux and wanting to partition up an old disk to install several distributions, one to each partition. What's the best of doing this? Will I be OK using Ubuntu's install process to format ext4 and create the partitions or would it be better to use Partition Magic?

Also, is it possible to then do a user-created boot menu? I remember in the past when I had more than one version of Windows installed, a boot menu was automatically generated... would like one for Windows and then each Linux distro.

And the other thing is, my keyboard doesn't seem to work during boot! It's fine for getting into BIOS and works fine when Windows boots, but not inbetween. On the 'Windows did not boot properly...' menu, I'm never able to navigate to other options so have to wait for the countdown. It's a Microsoft Digital Media Pro keyboard on a Gigabyte GA-EX58-UD3R. Thanks in advance for the help people!

More about : partitions boot menu

June 19, 2011 4:55:40 PM

You should be fine just using the included partitioner for each distribution. You can allocate how much space you want each partition to use manually. I'm also fairly certain you can just use the same /swap partition for each installation.

Grub can be configured, by modifying the /boot/grub/grub.cfg file. It will automatically generate an entry for each additional OS installed however, assuming the final installation you do includes grub. Windows should be installed first to avoid headaches.
m
0
l
June 19, 2011 10:26:32 PM

Well Windows will be on a separate drive, so this one will be pure Linux. So I can safely assume that every distribution will include a partitioner in the installation and Grub? I was planning on using Ubuntu, Debian, Mint, Fedora, OpenSUSE and Slackware, maybe Gentoo at a later date.
m
0
l
Related resources
June 19, 2011 11:42:54 PM

Why do you plan on running so many different distributions? I'm just curious, as it may make more sense to rune purely Windows, and virtualize all/most of the Linux distributions.
m
0
l
June 20, 2011 8:34:23 AM

You can only have 4 primary partitions, so you will have to create at least one (and at most three) primary partition, and an extended partition and create the rest of the partitions as logical partitions in that.

You can definitely share the swap partition, as I've done that before.
m
0
l
June 20, 2011 9:15:23 AM

You can use the same swap partition as long as you don't use hibernation, which normally saves to the swap partition.

I'm with Pyroflea; virtualization is the way to go in these circumstances. It will make much more efficient use of disk space and is almost as fast as native for Linux (and a lot less hassle to set up and maintain). Distributions that automatically modify the GRUB menu on installation of a new kernel can cause problems with multiple Linux installations (not a problem when virtualized). And which distribution's GRUB do you use to manage the intial boot menu? It can be done, but it tends to be a bit of a PITA.

You also have the advantage with virtualization that you can run more than one distribution at once providing you have sufficient RAM.
m
0
l
June 20, 2011 5:50:52 PM

Well the reason for so many distributions is really just curiosity! I'd like to get a feel for the differences between them (I suspect there may not be much difference beyond which applications are bundled, correct me if I'm wrong though) and I'd also like to try out several desktops (KDE, GNOME 2, GNOME 3, LXDE and Enlightenment) and would be nice to have them all instantly accessible on different distributions rather than keep switching around them on the same distribution.

I don't understand what you mean by '/swap partition' though, I know almost nothing about Linux. I understand it has an unusual file system where it spreads the OS across different partitions it creates, but I'm just talking about splitting a disk into several logical drives, just like you'd use Partition Magic for. If that's not necessary or beneficial though for running multiple distributions then that's fine by me!

It really doesn't matter if anything goes wrong since I'm running Windows on my SSD and all the files I care about are on a different hard disk. This is just an old 300gb disk I found and thought I'd put it to use to play around with Linux. I'm not planning on switching from using Windows (I need it for gaming!) so it really doesn't matter if things go wrong on this drive. It's purely a learning exercise (hence Slackware).
m
0
l
June 20, 2011 9:06:35 PM


Why not just get some hard drives cheaply and put one distro on each, if practical?
They're cheap, now
m
0
l
June 20, 2011 11:35:16 PM

The swap partition is like the page file in Windows. It's just a place for memory to dump when needed. Linux uses a partition rather than a file.

I really think running Virtualbox would be the best option for you. I was in your boat a few years back (and still am to some extent), and I can tell you from experience it's VERY nice to be able to install/uninstall distributions as you see fit. It's even nicer to have another OS running in the background in case your bork something, so you're able to check online for a solution (which is the best way to learn!). You can just save all the VM's virtual hard disks to the 300GB drive if you don't want them taking up precious real estate on your SSD.
m
0
l
June 23, 2011 9:14:50 PM

Cheers for the advice, appreciate it! I decided to keep things simple for the time being and just get to know Fedora... installed it fine, chose to format the whole drive Linux (i.e. this old 300gb I dug up) and set up Grub for defaulting to Windows (on my SSD) and then 2nd option Fedora on the old HDD. Fedora is running fine now (more or less, few glitches/crashes) but I'm concerned that I'm no longer able to boot from my SSD. I get a 'no such device exists' error and then a Grub recovery command prompt.

Only way I can access Windows now is to boot the old HDD and then select Windows from Grub's menu. I'm especially concerned because this hard disk has been gathering dust for over a year and since installation has been making some scratching noises! Really don't want my Windows drive to be dependent on a dying hard disk. Any advice on how to restore my SSD to non-Linux boot setup would be hugely appreciated!
m
0
l
June 23, 2011 9:36:59 PM

EasyBCD will allow Windows to use its Boot Loader. See if it is what you want.
m
0
l
June 24, 2011 6:25:00 PM

Thanks, it looked perfect but couldn't detect my BCD! I found a Microsoft support page for a system recovery tool on the Windows DVD but that didn't work... tried the command line to run bootrec.exe to rebuild my BCD and got an error that the volume does not contain a recognised filesystem. So assuming the drive it had found was my Windows drive, I ran the /FixMBR and now it seems that it was my Linux drive it found, since that no longer boots either (operating system not found error). So I have a Windows drive with a Linux boot sector/record/whatever and a Linux drive with a Windows one and neither boot. I wish I'd never touched Linux, this is a nightmare :-( Now running Linux Mint live DVD and it's seeing my Linux drive as a 500mb drive (yep, mb) with just efi, grub and lost+found and a few files (memtest86, some config files and some files I think are the kernel). There's nothing important on the Linux drive anyway, but I really need my Windows drive to boot! Any help would be hugely appreciated!
m
0
l
June 24, 2011 6:34:22 PM

I think that a Repair Install (of your Windows) should fix your boot problems.

At least you now appreciate why you were advised to install in a VM. It's much less hassle if things go wrong.
m
0
l
June 24, 2011 7:53:17 PM

Well I didn't realise Linux was so prone to wrecking boot sectors. The thought had occurred to me that even on a separate drive, Linux could screw things up... but then I decided I was being unfairly biased and prejudiced against Linux in thinking it incapable of installing without messing things up. Guess it showed me! Thanks for the 'I told you so' post though, those are always helpful.
m
0
l
June 24, 2011 8:35:35 PM

Installing another OS always entails the risk of ruining the boot process, even if it's just a different version of Windows. Linux is nothing special in that respect. But, come on, a Repair Install isn't that big a deal.

I realize that it is no help to you to be now told that you should have heeded the advice that you were given. It may, however, help to serve as a warning to others embarking on the same process.
m
0
l
June 24, 2011 10:09:59 PM

I'm afraid it was more than a repair install, Windows wouldn't install until I reformatted the drive. Windows is running now, got 88 automatic updates installing right now :-) AMD has let me down again - Aero doesn't seem to like Catalyst 11.6 so I have opaque Windows for the time being. There's definitely something to be said for not updating to each new version of Catalyst... gonna have another crack at Linux now, but this time with my SSD and other HDD unplugged!
m
0
l
June 25, 2011 7:47:20 AM

I'd still suggest a VM install, to make life easy for yourself. It is possible to install with the other disks disconnected and then set up a dual boot menu, but it's still potentially risky. Or you could just stick with the BIOS boot order menu. But a VM is far easier, particularly when you are just experimenting.
m
0
l
June 25, 2011 7:51:18 AM

I think it will be fine now if I never have my SSD plugged in when I install a Linux distribution? There isn't any way that Linux would try to access its MBR after installation is there? Keep in mind I don't really care about this old hard disk, there's nothing important on there, just for messing around on. Only the Windows drive (the SSD) matters. I'm setting up some partitions on it and apparently logical partitions aren't bootable? Also, can my swap partition be logical or does it need to be primary?
m
0
l
June 25, 2011 7:53:39 AM

I mean I'm setting up partitions on the old hard disk :-) And yes I'd just be using the BIOS boot menu to choose what to boot. I did some reading up on having Linux options in the BCD but sounds like people who know a lot more than me haven't had any luck with it. I don't mind hitting F12 though :-)
m
0
l
June 25, 2011 8:06:16 AM

I use BCD to boot a couple of Linux partitions. After you have installed on the hard disk get hold of EasyBCD and use it to set up the boot menu. That's pretty much a no-risk option and works fine for me. But when I'm playing with new Linux distros I use a VM. Truth is I very rarely boot into the native installations nowadays. The VM installations do everything that I want whilst allowing me to run more than one at once.

But horses for courses.
m
0
l
June 26, 2011 8:57:44 AM

I actually tried that while trying to salvage the boot sector of my SSD, but it wouldn't find my BCD (thanks a lot, Fedora!). These people were also using it when they were trying (and failing) to add Linux entries to BCD. Guess they knew less about it than you! The whole sda/sdb/sdb2/hd0,0 etc thing Linux does is a bit confusing, but I think I've got the hang of it.

Debian is running happily now (and it seems a lot more stable than the others) and Slackware is installed to another partition, but not visible in my GRUB. I've read up on menu.lst and I'm happy I know what I'm doing to edit it... except it's not even there! There's a grub.conf, but that has a comment at the top to not edit it... and it doesn't look like the examples I've seen online. I used grub-mkconfig to generate a menu.lst, but its contents look the same as grub.conf, with if statements and stuff. No big deal if I can't boot it though, Debian seems pretty good so far (except painfully slow browsing for some reason).
m
0
l
June 26, 2011 10:09:54 AM

Different versions of GRUB use different names for the configuration file. Nowadays it's generally called "grub.conf" (although I believe the very latest name is "grub.cfg"). But many distributions generate this file automatically and regenerate it when a new kernel is installed. This is why multi-booting several Linux distributions can be complicated.

What I do is to install the GRUB bootloader into the partition rather than the MBR (e.g. /dev/sda6 rather than /dev/sda). My BCD menu (edited with EasyBCD has two entries:

Windows 7
Linux

The "Linux" entry calls a NeoGrub bootloader (a special GRUB supplied with EasyBCD) and displays a selection of Linux distributions; the configuration file for this NeoGrub has entries like:

title Fedora
root (hd0,5)
chainloader +1

This one calls the GRUB installed by Fedora and displays it's menu. It doesn't matter that the Fedora GRUB configuration changes from time to time.

This does mean that you have to go through two or three boot menus for the Linux distros, but it works and lets each distribution maintain its own GRUB configuration without affecting the other distributions.
m
0
l
June 26, 2011 1:00:27 PM

Sounds awesome! I'll have a crack at it tonight and see how it goes :-) Appreciate all the advice, would be very cool to have this running together.
m
0
l
June 26, 2011 10:29:01 PM

Installed EasyBCD and working nicely for booting Debian... installed NeoGrub now but where do I find this NeoGrub config file? I tried booting it and just got a Grub command prompt.
m
0
l
June 27, 2011 7:45:47 AM

In EasyBCD click on the "Add New Entry Button". In the "Operating Systems" section open the tab "NeoGeo". Click on the "Configure" button. This then takes you into a text editor with the configuration file. Edit and save and then just back out.
m
0
l
June 27, 2011 8:30:37 PM

Cheers, I also found it in c:\NST\boot.lst :-) It won't boot Debian or Slackware (something about no executable), but I just made those entries directly in the Windows boot menu and it's all good with Debian, but Slackware won't boot (I just get a cursor)... I think maybe because I opted not to install LiLo (since Grub was already installed by Debian). Not sure how I can install Grub or LiLo into Slackware now if I can't boot into it? The Gentoo docs say the same thing you said about installing Grub to the partition's boot sector rather than MBR... but none of the Linux installations I've tried so far allow you to specify where it goes? I don't think Debian even asked me about Grub, it just did it.

Is there any way I could install Grub to my Slackware partition via Debian? Also, Gentoo docs suggest assigning a partition as a boot partition (of 32mb). Is that necessary or could I just do same as with the other distros and have swap in /swap and everything else in the same partition? This multiboot/partition stuff is confusing!
m
0
l
June 27, 2011 8:48:15 PM

Last question first. most distros do create a separate small /boot partition, but it's not essential.

Now, installing GRUB: boot up Debian and mount your Slackware partition somewhere (let's say /mnt). Now chroot to Slackware with the command

chroot /mnt

You can now use the "grub-install" command to install the boot loader. You'll need to read the grub manual to know what you're doing. "info grub" in a terminal will give this, or just Google it. once you've done it a few times it's easy. Just make sure that you use the partition rather than the MBR as the install target.

Once you've done that, "exit" to get out of the chroot environment, and then reboot.
m
0
l
June 27, 2011 9:02:49 PM

Thanks, appreciate the guidance :-) I'll have a go and see what happens!
m
0
l
!