LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bootloader error after resizing partitions (https://www.linuxquestions.org/questions/linux-newbie-8/bootloader-error-after-resizing-partitions-418619/)

republicson 02-23-2006 12:41 AM

Bootloader error after resizing partitions
 
Using DiskDrake on Mandriva Linux 2006 on KDE, I reduced the size of my windows partition (/mnt/windows) and created a new partition from the empty space mounted to /usr. When clicking on "Done" I get three messages:

1) Your bootloader configuration must be updated because partition has been renumbered (I click on "OK")

2) The bootloader cannot be installed correctly. You have to boot rescue and choose "Re-install Boot Loader" (I click on "OK")

3) You need to reboot for the partition table modifications to take place (I click on "OK")

At this point i cancel the reboot because I have no idea what these errors mean. Then I get another message:

4) You should format partition sda5. Otherwise no entry for mount point /usr will be written in fstab. Quit anyway? (I click on "Cancel" instead of "OK").


What do these messages mean and what should I do about them?

Artanicus 02-23-2006 01:54 AM

You should do waht it told you to do: stick the rescue disk into the CDROM drive and reboot your machine. When the rescuedisk comes up, select to reinstall bootloader.

The errors essentially mean that something went wrong with modifying yuor bootloader configuration and it will be easier to just reinstall it than to try modifying it.

The final one about formatting the disk was a important one. Since the new partition you created is now without a filesystem, you will have to create one for it at some point before using it and then manually add the entry for it in /etc/fstab.
Code:

mkfs.theFilesystemYouUse /dev/sda5
That command run as root should create the filesystem for the partition. Replace the "theFilesystemYouUse" with reiserfs, ext3 or whatever it is that you are using. (:

republicson 02-23-2006 02:18 AM

[QUOTE=Artanicus]You should do waht it told you to do: stick the rescue disk into the CDROM drive and reboot your machine. When the rescuedisk comes up, select to reinstall bootloader. [/QUOTE}

I haven't made a rescue disk. Will my Mandriva installation disks suffice or can I create one?

Quote:

Originally Posted by Artanicus
Code:

mkfs.theFilesystemYouUse /dev/sda5
That command run as root should create the filesystem for the partition. Replace the "theFilesystemYouUse" with reiserfs, ext3 or whatever it is that you are using. (:

I am using Mandriva 2006.0, so what exactly would I enter in here?

Artanicus 02-23-2006 02:31 AM

Well, you could always try reinstalling the bootloader yourself. But, Mandriva uses Grub and im not that familiar with it, am a Lilo fan myself.. Also I have no idea what filesystem Mandriva uses these days, back when I used it, it was ext3 but could be reiserfs these days.. The command
Code:

mount
should show you how your current partitions ar mounted, you will see your current filesystem from there.

republicson 02-23-2006 11:07 AM

Okay, it was ext3. Now, how do I make the rescue disk or reinstall the bootloader myself?

Also, here are the results of the mount and the mkfs commands
Code:

[root@localhost michael]# mount
/dev/sda5 on / type ext3 (rw)
none on /proc type proc (rw)
none on /proc/bus/usb type usbfs (rw)
none on /sys type sysfs (rw)
/dev/sda7 on /home type ext3 (rw)
none on /mnt/floppy type supermount (rw,sync,dev=/dev/fd0,fs=ext2:vfat,--)
[root@localhost michael]# mkfs.ext3 /dev/sda5
mke2fs 1.38 (30-Jun-2005)
/dev/sda5 is mounted; will not make a filesystem here!


Artanicus 02-23-2006 11:36 AM

Hum.. it seems that sda5 is your root partition.. So, that cannot be the one you resized.. Thus, the mkfs didn't work..

Usually one of the install disks also acts as a rescue disk, but I think we can get the bootloader reinstalled without it..

the command
Code:

grub-install /dev/sda
should work and install grub into the MBR. However, you should verify your grub config before reinstalling it since the new partition might screw the order up. The config oughta be located under /boot/grub/

republicson 02-23-2006 11:48 AM

Which one of these would be the config?

Code:

[michael@localhost ~]$ cd /boot/grub
[michael@localhost grub]$ ls -a
./  ../  mdv-grub_splash.xpm.gz  menu.lst.example


After asking this, I relized its probably the second one.

Artanicus 02-23-2006 11:51 AM

Weird. menu.lst is the one but you dont seem to have one.. Very weird.. I think your best bet is posting a new question about the grub problems, it will attract better attention and you'll find someone who knows more about grub..

republicson 02-23-2006 11:51 AM

Here's what the menu.1st.example file shows:

Code:

timeout 10
color 2
splashimage (hd0,4)/grub/mdv-grub_splash.xpm.gz
default 0
viewport 3 2 77 22
shade 1

title 2611-8
kernel (hd0,4)/vmlinuz-2.6.11-8mdk root=/dev/hda6 resume=/dev/hda1
initrd (hd0,4)/initrd-2.6.11-8mdk.img

Does that look good?

republicson 02-23-2006 11:52 AM

I'm not even sure what the grub problem is. What should I ask?

Artanicus 02-23-2006 11:55 AM

The example wont do since you have scsi disks.. And it would be a gamble to just try it out and not be able to boot again..

The problem mainly is that your grub freaked out and needs to be re-installed.

republicson 02-28-2006 01:36 PM

I ultimately just booted up with my Mandriva install disk and selected Repair (instead of a fresh install). It skips the partitioning and reinstalls the bootloader. I had to go in and re-mount the /usr partition. It still existed but didn't have a label. It is all working wonderfully now. Thanks a bunch!


All times are GMT -5. The time now is 01:46 PM.