2
I'm running a Linux Mint system on a former windows (Vista) hard drive. After a year or so of never booting the Windows, and getting space issues on the linux system partition, I decide to wipe the Windows partition (now primary partition /dev/sda1
below) and move the Linux system to it. I follow this guide, and all seems to work fine until I reboot after having moved and reconfigured grub2, the Master Boot Record and all, when the system keeps booting with the old partition. No way to make it boot from sda1
.
My partition table:
I managed to edit the grub.cfg, /etc/fstab on the new location, update the MBR, but the system won't boot on the partition I want. No matter what I do, I always end up booting from the old one.
I must admit that not all looked perfectly like in the guide. The grub.cfg had unexpected things in it. Here's an excerpt of grub.cfg where I had to improvise. This is the original version:
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Linux Mint 17.1 Cinnamon 64-bit, 3.13.0-37-generic (/dev/sda5)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 6b3cf8c6-8c6e-4c24-8f01-90276ef061c1
else
search --no-floppy --fs-uuid --set=root 6b3cf8c6-8c6e-4c24-8f01-90276ef061c1
fi
linux /boot/vmlinuz-3.13.0-37-generic root=UUID=6b3cf8c6-8c6e-4c24-8f01-90276ef061c1 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.13.0-37-generic
}
Here I replaced the UUID to the new partition as needed, but didn't quite understand how to change the root=hd0,msdos5
. So didn't change it. The guide says to:
Using gedit, find and replace every "(hdX,Y)" appropriately
X and Y should be replaced based on your new partition's /dev/sdZY or /dev/hdZY, if Z is 'a' then X should be '0', if Z is 'b' then X should be '1' and so on.
I can imagine that this is because the grub was set to enable booting in Windows. There was a menu entry like this, that I removed completely in the new grub.cfg:
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-BE8602CA860282DF' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 BE8602CA860282DF
else
search --no-floppy --fs-uuid --set=root BE8602CA860282DF
fi
parttool ${root} hidden-
chainloader +1
}
I have feeling that these hd0,msdos
entries should be different, but I can't figure out what to enter.
Anyway, the system keeps booting from the old partition, I'm still out of space on the system disk and would really appreciate to find a solution! Thanks!
Are tou using UEFI or legacy mode for booting ? – davidgo – 2016-03-23T08:08:01.610
How can I tell? – Max – 2016-03-23T15:32:58.810
This is obviously BIOS/MBR, because no FAT partition (so no EFI System Partition, so BIOS/CSM, unless you're booting this disk from another disk...), and the extended partition indicated that it's MBR partition table. – Tom Yan – 2016-03-24T06:38:58.933