Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey, I use SimplyMEPIS 3.3.1-1 on a second 80gb hard drive, with xp on the first 40gb. I have grub on my mbr, and recently got it into my head to install ubuntu on some of the free space. Well, Ubuntu's installation of grub said it recognized "Debian Linux 3.1", which MEPIS is based off of. However, when I rebooted the system, only the memtest option for mepis still existed. Windows worked, and I put in a LiveCD of mepis. When I installed grub frum MEPIS OS Center and rebooted, it only recognized my previous MEPIS installation and not ubuntu.
my fdisk -l looks like this:
Code:
Disk /dev/sda: 65 MB, 65536000 bytes
16 heads, 32 sectors/track, 250 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 249 63728 6 FAT16
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 4 32098+ de Dell Utility
/dev/hda2 * 5 4865 39045982+ 7 HPFS/NTFS
Disk /dev/hdb: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 1305 10482381 83 Linux
/dev/hdb2 1306 1496 1534207+ 82 Linux swap / Solaris
/dev/hdb3 1497 6718 41945715 83 Linux
/dev/hdb4 6719 7569 6835657+ 83 Linux
hda1 is Dell OEM, hda2 is Windows XP.
hdb1 is mepis /, hdb2 is swap, hdb3 is /home, hdb4 is ubuntu /.
sda1 is my usb drive.
According to QTParted from MEPIS, hdb1 is 10gb, hdb2 is 1.46gb, hdb3 is 40gb, and hdb4 is 6.52gb, with 18.35gb free space.
Use ONE of your installs to control grub, whichever you prefer.
Please provide the contents of /boot/grub/menu.lst and the
output of
# ls -l /boot
for each distro, and I'll explain how to go further
You should probably take a look at
$ apropos grub
$ man update-grub
I did all the following from MEPIS (hence the /mnt/hdb4/boot)
Here is the result of my MEPIS menu.lst:
Code:
timeout 15
color cyan/blue white/blue
foreground ffffff
background 0639a1
gfxmenu /boot/grub/message
title MEPIS at hdb1, kernel 2.6.10
kernel (hd1,0)/boot/vmlinuz-2.6.10 root=/dev/hdb1 nomce quiet splash=silent vga=791
initrd (hd1,0)/boot/initrd.splash
title MEPIS at hdb1, kernel 2.4.29
kernel (hd1,0)/boot/vmlinuz-2.4.29 root=/dev/hdb1 nomce quiet splash=silent vga=791 hdc=ide-scsi hdd=ide-scsi
initrd (hd1,0)/boot/initrd.splash
title Windows at hda2
rootnoverify (hd0,1)
chainloader +1
title MEMTEST
kernel /boot/memtest86.bin
and for Ubuntu:
Code:
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu
# Pretty colours
#color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/hdb4 ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,3)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single
## nonaltoption boot targets option
## This option controls options to pass to only the
## primary kernel menu item.
## You can have ONLY one nonaltoptions line
# nonaltoptions=quiet splash
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## ## End Default Options ##
title Ubuntu, kernel 2.6.12-9-386
root (hd1,3)
kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/hdb4 ro quiet splash
initrd /boot/initrd.img-2.6.12-9-386
savedefault
boot
title Ubuntu, kernel 2.6.12-9-386 (recovery mode)
root (hd1,3)
kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/hdb4 ro single
initrd /boot/initrd.img-2.6.12-9-386
boot
title Ubuntu, memtest86+
root (hd1,3)
kernel /boot/memtest86+.bin
boot
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/hdb1.
title MEMTEST (on /dev/hdb1)
root (hd1,0)
kernel /boot/memtest86.bin
savedefault
boot
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda2
title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1
OK, so what you probably want to do is have MEPIS controlling the bootloader in the MBR,
and every other distro you install can have a bootloader on their own partition.
So, in MEPIS add this to /boot/grub/menu.lst:
title Ubuntu
root (hd1,3)
chainloader +1
boot
See how that works for you.
I'd recommend you backup your MBR, grub config and
make sure you never install a bootloader to the MBR.
You might want to get tricky and be able to go back the other way
by chainloading from Ubuntu to MEPIS:
so edit /mnt/hdb4/boot/grub/menu.lst and add
I see what you're saying. What would happen if I did this? Would it then take me to another grub screen after I selected Ubuntu? I would think that since the Ubuntu bootloader would be on its partition, it would take me straight to Ubuntu. Is this what would happen?
Also, how would I back up my MBR?
Thanks a lot for all the advice. I was wondering about this for a while.
Yes it should take you from the MEPIS grub screen to the Ubuntu one.
To backup your MBR (assuming you're booting from hda)
# dd if=/dev/hda of=MyMBR.img bs=1 count=446
by default, dd uses bs=512, which would also copy your partition table ...
(which is the last 64 bytes of the first sector)
...not something you always want to do.
Remember to save this file on an external device.
Ok, I edited my menu.lst for my MEPIS grub, but if I select Ubuntu, it takes me to a blue and black screen for "GNU Grub", and asks me to select an option again. I assume this is because I don't have Grub on my Ubuntu partition. Would I have to download/burn an Ubuntu LiveCD to install Ubuntu's grub on the partition? or would the Ubuntu install cd do that?
OK, so what you probably want to do is have MEPIS controlling the bootloader in the MBR,
and every other distro you install can have a bootloader on their own partition.
Yes, you assume correctly ... I should have made it more clear.
It would probably be easiest for you to reinstall Ubuntu and write the bootloader
to hda4 rather than the MBR.
GRUB and LILO always conflict with Windows. And GNU GRUB is not so robust, causing many problems during boot.
So try GRUB for DOS please. It is a cross-platform boot loader based on GNU GRUB. The GRUB.EXE can be started from DOS/Win9x; and GRLDR can be started from BOOT.INI of Windows NT/2K/XP/2003; and even more, the GRUB.EXE can be started from LINUX via the KEXEC tool.
By using GRUB.EXE or GRLDR, you don't have to touch your MBR. It is the safest way coexisting with DOS/Windows.
You needn't install GRUB for DOS. Just run GRUB.EXE from DOS, or append a line of "C:\GRLDR=START GRUB" into your BOOT.INI(restart and select the "START GRUB" menu item), that will do.
... then it would allow me to boot my dsl install from my 5th partition on my first hd.
and if i were to add
title SUSE
root (hda1)
chainloader +1
boot
it would add another option to boot SUSE from the first hd?
and i could install as many distros as i have the partitions for and all i need to do to allow me to boot from them all once again is to add those 4 lines of code to the grub config???
it seems too good to be true. its really that simple??
eep, before i post.. i noticed the hds are writen a little different.... so (hda5) would become (hd0,5).... that right?
... then it would allow me to boot my dsl install from my 5th partition on my first hd.
make that:
root (hd0,4)
and it would chainload the bootloader on hda5
Quote:
and if i were to add
title SUSE
root (hda1)
chainloader +1
boot
it would add another option to boot SUSE from the first hd?
root (hd0,0)
Quote:
and i could install as many distros as i have the partitions for and all i need to do to allow me to boot from them all once again is to add those 4 lines of code to the grub config???
it seems too good to be true. its really that simple??
You will need a 'controlling' bootloader, probably used by the first distro you install.
Each subsequent install will need to have their bootloader installed to the /boot partition
(or / if there is not a separate boot partition)
for the respective distro.
DO NOT INSTALL THE BOOTLOADER FOR SUBSEQUENT DISTROS IN THE MBR!
It is good, true and simple
Quote:
eep, before i post.. i noticed the hds are writen a little different.... so (hda5) would become (hd0,5).... that right?
no, (hd0,4) .... grub counts from 0
...(hd[disk][partition])
Remember to make backups of your bootloaders AND SAVE THEM ON REMOTE/REMOVABLE MEDIA,
because if you make a mistake while playing around you might find it tricky to recover.
so in theory this sould proove no problem for even having multiple opperating systems to boot from different partitions on the same physicla drive? even logical partitions in the extended partition??? or is that pushing it?
Yes, you can have multiple OS's chainloaded on any partition (primary or logical).
They do not have to be on the same physical drive.
To essentially have a 'back' button on a chainloaded OS's boot menu, just chainload the MBR.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.