PDA

View Full Version : [kubuntu] 10.04 Upgrade - Problem with Grub on Fake Raid



martin1977
April 30th, 2010, 11:13 PM
The only problem I had upgrading to 10.04 was with grub which was not updated and my fake raid partition name had changed from jmicronRAID6 to jmicron_RAID____________6 which prevented booting.

I would appreciate a bit of help with grub (not grub2) on fake raid. I can boot into the above installation about half of the time, but sometimes end up at the initramfs prompt.

Running update-grub gives:

sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
device-mapper: table ioctl failed: No such device or address
/usr/sbin/grub-probe: error: cannot find a GRUB drive for
/dev/mapper/jmicron_RAID____________6. Check your device.map.
You have a memory leak (not released memory pool):
[0x7591f0]

device.map has the following contents

(hd0) /dev/sda
(hd1) /dev/sdb
(hd2) /dev/mapper/jmicron_RAID

where jmicron_RAID is a RAID0 array of the first two with partitions for Windows (2No), Ubuntu and Swap

Output of df
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/jmicron_RAID____________6
193233600 26721576 156696312 15% /
none 1023736 340 1023396 1% /dev
none 1028364 0 1028364 0% /dev/shm
none 1028364 100 1028264 1% /var/run
none 1028364 0 1028364 0% /var/lock
none 1028364 0 1028364 0% /lib/init/rw

etc/fstab

proc /proc proc defaults 0 0
/dev/mapper/jmicron_RAID____________6 / ext4
errors=remount-ro 0 1
/dev/mapper/jmicron_RAID____________7 none swap
sw 0 0
#/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd0 /media/cdrom0 udf,iso9660
users,noauto,uid=0,gid=46,mode=0777,dmode=0777,nos uid,noexec 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
/dev/mapper/jmicron_RAID____________1 /mnt/c ntfs-3g
defaults,locale=en_GB.UTF-8 0 0
/dev/mapper/jmicron_RAID____________5 /mnt/d ntfs-3g
defaults,locale=en_GB.UTF-8 0 0

Clearly from update-grub things are a bit messed up, although when it does boot everything seems fine.

NTFS Mounts in /etc/fstab are also failing sometimes but not always?

The original install, Ubuntu 9.04 I think was tricky, failing to install grub. The upgrade did not change grub either.

Any ideas?

Martin

popat007
May 1st, 2010, 02:32 AM
i too had same problem with memory leak while installing grub-pc (Grub2) on software raid0 on Vol01. if i install bootloader in to root partition (i.e: Vol01 where system is install), while i am installing Ubuntu, then it will destroy raid partition and you will loose all other OS/Data partition and it will install in the MBR. (i keep backup of MBR to i can revert back). so i did not install bootloader while installing Ubuntu. i am not installing in to MBR. After installation is complete, i boot once again from live CD and chroot into the filesystem.


sudo mkdir /mnt/Ub-System
sudo mount /dev/mapper/you_raid0_Volume /mnt/Ub-System
sudo mount -o bind /proc /mnt/Ub-System/proc
sudo mount -o bind /dev /mnt/Ub-System/dev
sudo mount -o bind /dev/pts /mnt/Ub-System/dev/pts
sudo mount -o bind /sys /mnt/Ub-System/sys
sudo chroot /mnt/Ub-System /bin/bash

Now you are in to the system that you install.

Remove grub-pc (Grub2)


sudo apt-get --purge remove startupmanager (if you installed)

sudo apt-get --purge remove grub-pc grub-common

Now install legacy grub


sudo apt-get install grub

It will try to install grub. if it finds yours boot partition then try to install to your raid0 Volume01 partition.(be careful do not install in MBR or other partition) if you do not find your partition in selection, then kill grub install and goto


/usr/lib/grub/x86_64-PC

and copy all files into


/boot/grub/

Now enter in to grub


sudo grub


grub>find /boot/grub/stage1

this will give you like (hd0,1) depending on where you install Ubuntu, be careful with (hd0,X) X is your partition you want to install bootloader.


grub>device (hd0) /dev/mapper/your_raid0_harddrive (Not the Volume where you want to install boatloader)


grub>root (hd0,1) (where Ubuntu is install or boot partition)

if you install bootloader in MBR then


grub>setup (hd0)

or if you install bootloader in Volume/Partition then


grub>setup (hd0,X) where 'X' is your Volume/Partition.(example: setup (hd0,1))

will install grub


grub>quit


sudo update-grub

Thats it enjoy

Octagonal
May 1st, 2010, 10:02 PM
Thanks popat007 this helped me get my raid 0 working in 10.04

popat007
May 2nd, 2010, 06:42 AM
@Octagonal
You are welcome. I am happy, that it help you. Grub is really a legacy.
I am using another bootloader, and this bootloader is within bootloader :)

and! What's there in name!!!:)

martin1977
May 4th, 2010, 08:52 AM
Thank you popat007,

Your instructions worked for me, but unfortunately I was still left with a system that failed to load up reliably. I got around the problem by putting a fresh install on to a spare hard disk (with grub2) and after installing dm-raid and running update-grub that got me back into my Windows XP and Ubuntu 10.04 upgrade installations on the fake raid array. However, the 10.04 upgrade is still not loading reliably (ending up at the initramfs prompt), so it was probably not a grub problem after all.

Martin

popat007
May 4th, 2010, 03:48 PM
@martin1977

Did you install bootloader on MBR of spare harddisk or on to the raid0 system harddisk? if you installed ubuntu on spare harddisk then, i think everything should work normal. I use another bootloader, so i install grub bootloader into another bootloader.But remember in my case, if i try to install bootloader in volume/partition of raid0 while installing ubuntu and selecting install bootloader in partition in step 8 of ubiquity(Advanced), it will not install into the volume/partition, it will install in MBR of my raid0 and ruin my raid0, because i am using another bootloader and my all the partition entry are gone except the current Ubuntu install, so i don't install bootloader while installing Ubuntu. If i try to install Grub2 after ubuntu is installed(after restart from liveCD), i get memory leak problem, so i install grub-legacy(grub) into the partition after ubuntu is installed and everthing works well.

I think there is still problem with ubiquity. The memory leak bug is also not addressed properly.

martin1977
May 4th, 2010, 08:49 PM
Grub2 went on the new hard disk. The strange thing is that sometimes I can load the upgraded 10.04 from this new grub2 and sometimes it fails (as before with the old legacy grub). I'm not going to spend any more time on it - the fresh install on the spare disk is fine and the Raid0 was primarily for a Windows application (FE analysis).

Thanks for your advice.

Martin

jaygo
May 5th, 2010, 05:12 AM
I ran into a number of errors while following your directions but I eventually suceeded by removing grub1 & reinstalling grub2 (grub-pc) from the chrooted environment. I then ran grub-install and chose to install grub to the dmraid array only -- /dev/mapper/nvidia_yadayada , in my case. And I had to mark the boot partition as bootable in fdisk. Now I'm booting from fakeraid raid5 with no raid1, nor even a separate boot partition. Only took about ten hours of wrestling :)

I'll mention that I tried installing the boot loader (under 'advanced' in the desktop installer) onto both the array and the boot partition on the array and neither worked. Apparently, doing it manually makes all the difference.

(read about it here: http://www.mail-archive.com/grub-devel@gnu.org/msg08909.html )

popat007
May 5th, 2010, 09:54 AM
This instruction is specific to grub-legacy(grub) not grub-pc(grub2).
OP requested grub-legacy help.

I would appreciate a bit of help with grub (not grub2) on fake raid. I can boot into the above installation about half of the time, but sometimes end up at the initramfs prompt.

In my case even if i try to install grub-pc after installation(64bit), it will give memory leak error, thats why grub-legacy comes in picture. so to remove grub-pc and install grub-legacy, which goes smoothly without error.