How do I stop PC booting the wrong partition ?[SOLVED]
LMDE 2 has reached end of support as of 1-1-2019
How do I stop PC booting the wrong partition ?[SOLVED]
I downloaded Clonezilla Live (*) iso and burnt it to a USB stick. I then used it taking all defaults to clone the local LMDE partition (which is on sda6 **) to another local partition (sda8) which I want to use in future for testing changes before updating the main system. Clonezilla finished OK and I shut it down. I rebooted the netbook and LMDE came up just fine. However, when I checked the partitions using Gparted, sda8 was mounted and sda6 wasn't, not what I expected. I shut down and rebooted. The GRUB menu definitely says the LMDE system I chose to boot is on sda6, not sda8. I guess that it was something Clonezilla did which caused sda8 to become the default boot partition, and ignore the previous default boot partition, but Clonezilla did not update the GRUB menu accordingly.
1. Can I stop this happening on a different PC if I also clone the current LMDE partition ? If so, how ? I've looked at the Clonezilla doc online and I can't see anything there to help.
2. How do I modify the GRUB menu to boot the sda6 partition like it used to, also to boot sda6 in recovery mode if required ?
3. How do I modify the GRUB menu to add additional options to boot the sda8 partition in ordinary or recovery mode ?
Ron
* I decided not to use the Clonezilla package in Synaptic Package Manager as it was the Server Edition. I thought Clonezilla Live was a better fit for me.
** sda1 through sda5 are partitions as Acer supplied with the netbook including Win 7 system, while sda7 is the Linux Swap.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How do I stop PC booting the wrong partition ?
I suspect that Clonezilla preserved the UUID of the partition so it's the same as sda6. The initrd uses the UUID to to fetch some pre-booting info from the partition and sda6 is most likely found first.
paste back
Code: Select all
sudo blkid
Code: Select all
egrep 'vmlinuz|initrd' /boot/grub/grub.cfg
Re: How do I stop PC booting the wrong partition ?
Code: Select all
/dev/sda1: LABEL="PQSERVICE" UUID="16BCF517BCF4F1DB" TYPE="ntfs"
/dev/sda2: UUID="E2F0-474B" TYPE="vfat"
/dev/sda3: LABEL="SYSTEM RESERVED" UUID="28BCF745BCF70BD6" TYPE="ntfs"
/dev/sda5: LABEL="Acer" UUID="B030F98030F94E3A" TYPE="ntfs"
/dev/sda7: UUID="afc6dcda-65ea-446d-9c95-4d355a03debc" TYPE="swap" LABEL="SWAP"
/dev/sda6: UUID="c456e7bd-e79e-496c-93a1-5c522359fdaa" TYPE="ext4" LABEL="LMDE"
/dev/sda8: LABEL="LMDE" UUID="c456e7bd-e79e-496c-93a1-5c522359fdaa" TYPE="ext4"
and
Code: Select all
linux /boot/vmlinuz-3.11-2-amd64 root=UUID=c456e7bd-e79e-496c-93a1-5c522359fdaa ro quiet splash
initrd /boot/initrd.img-3.11-2-amd64
linux /boot/vmlinuz-3.11-2-amd64 root=UUID=c456e7bd-e79e-496c-93a1-5c522359fdaa ro single
initrd /boot/initrd.img-3.11-2-amd64
Re: How do I stop PC booting the wrong partition ?
Re: How do I stop PC booting the wrong partition ?
Ron
Re: How do I stop PC booting the wrong partition ?
at time I run OS plus its clone in the same hard disk, but different partition, then I experienced what you reported.
In additions, I even dist-upgrade, and eventually found all sort of weird things..
So I learned it is not advisable to run OS with its clone partition also active at the same time!!
Now my practice , if I wish to have another 'same OS' running in the same internal hard disk, or external USB drive, I no longer use clone method, what I have been doing is, use qt4-fsarchiver to backup the OS partition to a 'compressed file', it can be store anywhere, in data partition, in external USB, etc
Then, run qt4-fsarchiver again, restore this to another partition, it will have different UUID and it will become not a clone but another 'same OS'.. this way I stayed away from the problem you reported.
Re: How do I stop PC booting the wrong partition ?
UPDATE : I can see fsarchiver in Synaptic Package Manager but no sign of qt4-fsarchiver ...
UPDATE 2 : I have found qt4-fsarchiver on its own site and am downloading the Live-CD image
Would reformatting sda8 after booting with LMDE-Live clear the duplicate UUID ? If not, how do I get rid of the duplicate UUID ?
UPDATE 2 : answered in the post following
Ron
Re: How do I stop PC booting the wrong partition ?
A few minor adjustments will get both installations running
Code: Select all
sudo -i
Code: Select all
if mount|grep sda8; then umount -l /dev/sda8;fi
Code: Select all
tune2fs /dev/sda8 -L LMDETEST
Code: Select all
test $(which uuid) || sudo apt-get install uuid
Code: Select all
tune2fs /dev/sda8 -U $(uuid)
Code: Select all
mount /dev/sda8 /mnt
Code: Select all
mount -t proc none /mnt/proc
Code: Select all
mount --rbind /sys /mnt/sys
Code: Select all
mount --rbind /dev /mnt/dev
Code: Select all
/usr/sbin/chroot /mnt /bin/bash
Code: Select all
source /etc/profile
Code: Select all
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
Code: Select all
export PS1="\[\033[1;33m\]chroot to ->\[\033[1;31m\](system) #\[\e[0m\] "
Code: Select all
blkid|grep sda8|awk '{print $3}'|tr -d 'UUID="'
Code: Select all
sed -i.bak 's/c456e7bd-e79e-496c-93a1-5c522359fdaa/newuuidhere/1' /etc/fstab
Code: Select all
update-initramfs -uv -k $(ls /boot/|grep vmlinuz|cut -c 9-)
Code: Select all
exit
Code: Select all
reboot
Code: Select all
sudo /usr/sbin/update-grub
Good luck
Re: How stop PC booting the wrong partition ?
It would be nice if I could change the entries relating to LMDETEST to be a little more distinctive, preferably including LMDETEST. They currently both start
Code: Select all
LMDE Cinnamon 64-bit, 3.11-2-amd64 (/dev/sda6) (on /dev/sda8)
Code: Select all
LMDE Cinnamon 64-bit, 3.11-2-amd64 (/dev/sda6)
UPDATE I had marked this thread as SOLVED but that is not the case. The symptom noted above actually tells me (but I didn't realise it) that I now have 4 choices for booting the LMDE partition, sda6, 2 at the top of the GRUB menu, either running system or recovery mode, and 2 at the bottom of the GRUB menu, also running system or recovery mode. I had assumed that the 2 at the bottom of the GRUB menu would boot the LMDETEST partition, sda8, but they don't. Instead they boot the LMDE partition, sda6. I do not have a GRUB menu option which boots the LMDETEST partition.
What do I need to do to get GRUB to contain an option to boot the LMDETEST partition, sda8
Re: How do I stop PC booting the wrong partition ?
When I had 2 identical partitions, both were shown as having a mount point /
Now I have non-identical partitions, only sda6 is shown as having a mount point /
Ron
Re: How do I stop PC booting the wrong partition ?
Code: Select all
mount|grep -w /
Code: Select all
egrep '^UUID|^/dev' /etc/fstab
Re: How do I stop PC booting the wrong partition ?
Ron
Re: How do I stop PC booting the wrong partition ?
Code: Select all
ron@baby-2 ~ $ mount |grep -w /
/dev/disk/by-uuid/c456e7bd-e79e-496c-93a1-5c522359fdaa on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
Code: Select all
ron@baby-2 ~ $ egrep '^UUID|^dev' /etc/fstab
UUID=c456e7bd-e79e-496c-93a1-5c522359fdaa / ext4 rw,errors=remount-ro 0 1
UUID=afc6dcda-65ea-446d-9c95-4d355a03debc swap swap sw 0 0
Re: How do I stop PC booting the wrong partition ?
The GRUB items are (abbreviated, I don't know how to do a screen capture of the GRUB screen)
Code: Select all
LMDE Cinnamon ... sda6
LMDE Cinnamon ... sda6 recovery
Win 7
Win 7 recovery
LMDE Cinnamon ... sda6 ... on sda8
LMDE Cinnamon ... sda6 ... on sda8 recovery
Ron
Re: How do I stop PC booting the wrong partition ?
Code: Select all
sudo blkid
Code: Select all
grep vmlin /boot//grub/grub.cfg
Re: How do I stop PC booting the wrong partition ?
Code: Select all
ron@baby-2 ~ $ sudo blkid
[sudo] password for ron:
/dev/sda1: LABEL="PQSERVICE" UUID="16BCF517BCF4F1DB" TYPE="ntfs"
/dev/sda2: UUID="E2F0-474B" TYPE="vfat"
/dev/sda3: LABEL="SYSTEM RESERVED" UUID="28BCF745BCF70BD6" TYPE="ntfs"
/dev/sda5: LABEL="Acer" UUID="B030F98030F94E3A" TYPE="ntfs"
/dev/sda7: UUID="afc6dcda-65ea-446d-9c95-4d355a03debc" TYPE="swap" LABEL="SWAP"
/dev/sda6: UUID="c456e7bd-e79e-496c-93a1-5c522359fdaa" TYPE="ext4" LABEL="LMDE"
/dev/sda8: LABEL="LMDETEST" UUID="015fac40-f127-11e3-ad5a-2b2b889acdff" TYPE="ext4"
Code: Select all
ron@baby-2 ~ $ grep vmlin /boot//grub/grub.cfg
linux /boot/vmlinuz-3.11-2-amd64 root=UUID=c456e7bd-e79e-496c-93a1-5c522359fdaa ro quiet splash
linux /boot/vmlinuz-3.11-2-amd64 root=UUID=c456e7bd-e79e-496c-93a1-5c522359fdaa ro single
linux /boot/vmlinuz-3.11-2-amd64 root=UUID=c456e7bd-e79e-496c-93a1-5c522359fdaa ro quiet splash
linux /boot/vmlinuz-3.11-2-amd64 root=UUID=c456e7bd-e79e-496c-93a1-5c522359fdaa ro single
Re: How do I stop PC booting the wrong partition ?
Code: Select all
sudo /usr/sbin/grub-mkconfig|grep vmlinuz
- Spearmint2
- Level 16
- Posts: 6900
- Joined: Sat May 04, 2013 1:41 pm
- Location: Maryland, USA
Re: How do I stop PC booting the wrong partition ?
Re: How do I stop PC booting the wrong partition ?
Code: Select all
sudo /usr/sbin/grub-mkconfig|grep vmlinuz
[sudo] password for ron:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.11-2-amd64
Found initrd image: /boot/initrd.img-3.11-2-amd64
linux /boot/vmlinuz-3.11-2-amd64 root=UUID=c456e7bd-e79e-496c-93a1-5c522359fdaa ro quiet splash
linux /boot/vmlinuz-3.11-2-amd64 root=UUID=c456e7bd-e79e-496c-93a1-5c522359fdaa ro single
No volume groups found
Found Windows Recovery Environment (loader) on /dev/sda1
Found Windows 7 (loader) on /dev/sda3
Found LMDE Cinnamon Edition (1) on /dev/sda8
linux /boot/vmlinuz-3.11-2-amd64 root=UUID=c456e7bd-e79e-496c-93a1-5c522359fdaa ro quiet splash
linux /boot/vmlinuz-3.11-2-amd64 root=UUID=c456e7bd-e79e-496c-93a1-5c522359fdaa ro single
done
Code: Select all
sudo blkid
/dev/sda1: LABEL="PQSERVICE" UUID="16BCF517BCF4F1DB" TYPE="ntfs"
/dev/sda2: UUID="E2F0-474B" TYPE="vfat"
/dev/sda3: LABEL="SYSTEM RESERVED" UUID="28BCF745BCF70BD6" TYPE="ntfs"
/dev/sda5: LABEL="Acer" UUID="B030F98030F94E3A" TYPE="ntfs"
/dev/sda7: UUID="afc6dcda-65ea-446d-9c95-4d355a03debc" TYPE="swap" LABEL="SWAP"
/dev/sda6: UUID="c456e7bd-e79e-496c-93a1-5c522359fdaa" TYPE="ext4" LABEL="LMDE"
/dev/sda8: LABEL="LMDETEST" UUID="015fac40-f127-11e3-ad5a-2b2b889acdff" TYPE="ext4"
- Spearmint2
- Level 16
- Posts: 6900
- Joined: Sat May 04, 2013 1:41 pm
- Location: Maryland, USA
Re: How do I stop PC booting the wrong partition ?
Code: Select all
sudo update-grub