LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB unable to mount partition (https://www.linuxquestions.org/questions/linux-newbie-8/grub-unable-to-mount-partition-553866/)

Amuro-Ray2020 05-14-2007 04:09 PM

GRUB unable to mount partition
 
I have a 160 GB hard drive that I have created 3 partitions on, sda1 which is ext3, sda2 which is NTFS, and sda3 which is ext3 also. I have installed two different Linux distro's, Backtrack2 on sda1, and then Linux Mint on sda3. GRUB recognizes the NTFS partition and the Mint partition, both Windows and Mint boot fine. However, the Backtrack 2 partition was not recognized, so I added it myself to menu.lst:

Code:

## ## End Default Options ##

title          Backtrack 2
root            (hd0,0)
kernel          /boot/vmlinuz root=/dev/sda1 ro quiet splash
initrd          /boot/splash.initrd
quiet
savedefault
boot

title          Linux Mint (KDE), kernel 2.6.17-10-generic
root            (hd0,2)
kernel          /boot/vmlinuz-2.6.17-10-generic root=/dev/sda3 ro quiet splash
initrd          /boot/initrd.img-2.6.17-10-generic
quiet
savedefault
boot

title          Linux Mint (KDE), kernel 2.6.17-10-generic (recovery mode)
root            (hd0,2)
kernel          /boot/vmlinuz-2.6.17-10-generic root=/dev/sda3 ro single
initrd          /boot/initrd.img-2.6.17-10-generic
boot

title          Linux Mint (KDE), memtest86+
root            (hd0,2)
kernel          /boot/memtest86+.bin
quiet
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 a non-linux OS
# on /dev/sda2
title          Windows Vista/Longhorn (loader)
root            (hd0,1)
savedefault
makeactive
chainloader    +1

The partition can be mounted in Linux Mint, so I based my grub entry on the lilo.conf file:

Code:

boot = /dev/sda
prompt
timeout = 20
bitmap=/boot/splash.bmp
change-rules
reset
vga = 0x317
image = /boot/vmlinuz
  root = current
  initrd = /boot/splash.initrd
  label = bt
  read-only

As I mentioned, when I try to boot the Backtrack 2 entry in GRUB, it fails with an error stating that the partition cannot be mounted. I have very little experience with GRUB, how can I get this to work?

Any help is greatly appreciated! :)

bigrigdriver 05-14-2007 04:26 PM

Boot mint and mount the Backtrack partition. Look into the /boot folder (Backtrack) and get the name of the initrd file you find there. Then edit your grub config to show the same name.

Amuro-Ray2020 05-14-2007 04:32 PM

Splash.img
 
That's what I did, but there was only one initrd in the boot folder:

Code:

tsnow@Mint-laptop:/Backtrack2/boot$ ls -a
.  ..  map  splash.bmp  splash.initrd  vmlinuz

Could it be somewhere else? This distro is based on SLAX, but I installed the full version to the hard drive, so it should be able to boot, assuming I used lilo. Isn't there a way I can install lilo to that partition, then have GRUB load lilo? Cause I know that you chainload the NTLDR for Windows...

Thanks for the quick response :D

syg00 05-14-2007 04:52 PM

The root direct locates the grub stage files - it needs to be the same in all stanzas. Try this
Code:

title          Backtrack 2
root            (hd0,2)
kernel          (hd0,0)/boot/vmlinuz root=/dev/sda1 ro quiet splash
initrd          (hd0,0)/boot/splash.initrd
boot

I prefer to have a separate boot partition; then copy the images into that, then you can use something similar to what you have (except the root directive of course).
Means you have to think up names for your kernel images ...;)

Amuro-Ray2020 05-14-2007 05:15 PM

Error 17
 
Thanks syg00, I didn't know that! Okay, I have made the changes, and my grub menu.lst stanza for Backtrack looks like this:

Code:

title          Backtrack 2
root            (hd0,2)
kernel          (hd0,0)/boot/vmlinuz root=/dev/sda1 ro quiet splash
initrd          (hd0,0)/boot/splash.initrd
boot

However, it still gives me an Error 17: Cannot mount partition. I have no idea where to proceed from here :scratch:

bigrigdriver 05-14-2007 05:43 PM

At this point, I suggest re-installing Backtrack. Install the bootloader to the boot sector of the partition (not to the MBR). Pay careful attention to the partition selection and format options.

Then edit the grub config in Mint to read:

title Backtrack2
root (hd0,0)
chainloader +1

The chainloader option works just as well as specifying the kernel parameters and initrd. It works because the bootloader for that partition is completely installed in (hd0,0) boot sector, and you just pass the boot process over to that bootloader.

Amuro-Ray2020 05-15-2007 02:07 AM

Error 13
 
Okay, I tried the chainloader idea, and at least now it gives me a different error message. I made sure that lilo installed to /dev/sda1, and now upon attempting to boot with the menu.lst of:

Code:

title Backtrack2
root (hd0,0)
chainloader +1

It gives me an error code of 13, unsupported executable format :confused:

uncle-c 05-15-2007 08:40 AM

I'm begining to wonder if the partition housing backtrack is actually bootable. Have you tried using any "Rescue CDs" which can boot individual partitions ? Also what is your "fdisk -l" output like ?

UC


All times are GMT -5. The time now is 12:17 AM.