Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Can I dual boot 9 and 10?

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Can I dual boot 9 and 10?

#16 Post by Head_on_a_Stick »

If the hard drive is using a GUID partition table then just delete the swap lines in /etc/fstab for all installed distributions that boot with systemd and let that automount them instead, then you won't have to worry about updating the entries ever again.
deadbang

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Can I dual boot 9 and 10?

#17 Post by uthappam »

Thank you. This is much simpler than the route I had imagined I would have to take, involving BLKID, UUIDGEN, TUNE2FS then two each of FSTAB and GRUB. But I must search for the meaning of GUID.
[addition] Bad news. The partition table is MSDOS.
Last edited by uthappam on 2019-02-19 08:01, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Can I dual boot 9 and 10?

#18 Post by Head_on_a_Stick »

Check your partition table type with

Code: Select all

# parted -l
Look for the "Partition Table" section for your disk, "gpt" means the disk has a GUID partition table.
deadbang

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Can I dual boot 9 and 10?

#19 Post by p.H »

Head_on_a_Stick wrote:If the hard drive is using a GUID partition table then just delete the swap lines in /etc/fstab for all installed distributions that boot with systemd and let that automount them instead
The swap is also used for hibernation (suspend-to-disk). This won't fix the delay before "Gave up waiting for suspend/resume device".
Remove or update any reference to the swap in /etc/initramfs-tools/conf.d/resume and rebuild the initramfs with

Code: Select all

update-initramfs -u
uthappam wrote:the route I had imagined I would have to take, involving BLKID, UUIDGEN, TUNE2FS then two each of FSTAB and GRUB.
You don't need uuidgen. tune2fs is for ext* only, not swap. GRUB does not care about swaps.
You have two routes :
a) update or remove all references to the swap UUID in Stretch in fstab and initramfs.
b) reset the previous UUID with swaplabel and update or remove all references to the swap UUID in Buster.

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Can I dual boot 9 and 10?

#20 Post by uthappam »

Thank you, p.H. I did these things (cannot remember where on the Net I found them): used blkid to identify the swap partition, then put the UUID into /etc/fstab and /etc/initramfs-tools/conf.d/resume. Ran sudo update-initramfs -u. When I rebooted, Debian 9 started up without delay or error messages. I then went into Buster and repeated what I had done in Stretch. After it was asked to update initramfs, it complained that there was "no matching swap device available." Strange, fstab points to /etc/sda5 in both Debians.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Can I dual boot 9 and 10?

#21 Post by p.H »

You did not have to change anything in Buster, it already referenced the up-to-date UUID.
Please post the output of the following commands in Buster :

Code: Select all

blkid | grep swap
swapon -a
grep swap /etc/fstab
cat /etc/initramfs-tools/conf.d/resume

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Can I dual boot 9 and 10?

#22 Post by uthappam »

Here are the results of running the commands you listed:

Code: Select all

blkid | grep swap
/dev/sda5: UUID="f0bcc9fd-b8f9-445c-aaf1-b4f06cbc20f4" TYPE="swap" PARTUUID="922fc955-05"

swapon -a
swapon: cannot find the device for UUID=16658fa8-8468-4cf1-955a-8bcc2e588741

grep swap /etc/fstab
# swap was on /dev/sda5 during installation
UUID=16658fa8-8468-4cf1-955a-8bcc2e588741 none            swap    sw              0       0

cat /etc/initramfs-tools/conf.d/resume
RESUME=UUID=16658fa8-8468-4cf1-955a-8bcc2e588741
The first UUID is different from the other three. I do not know how to replace the rogue.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Can I dual boot 9 and 10?

#23 Post by p.H »

blkid shows the actual UUID. The config files just contain references which should match the actual UUID.
Update fstab and resume with the actual UUID shown by blkid.

uthappam
Posts: 242
Joined: 2010-01-01 17:14
Location: Delhi, India

Re: Can I dual boot 9 and 10?

#24 Post by uthappam »

Thank you. Now both siblings are running well.

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: Can I dual boot 9 and 10?

#25 Post by MagicPoulp »

Why should one prefer to dual boot instead of using debootstrap to install debian 9 in a subfolder?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Can I dual boot 9 and 10?

#26 Post by p.H »

Because one wants to install Debian Buster, not 9.

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: Can I dual boot 9 and 10?

#27 Post by MagicPoulp »

Why is it so hard to setup a double boot 2 debian versions?

Why can't debian 10 detect and reuse the swap of debian 9 automatically?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Can I dual boot 9 and 10?

#28 Post by p.H »

MagicPoulp wrote:Why is it so hard to setup a double boot 2 debian versions?
Can you elaborate ?
MagicPoulp wrote:Why can't debian 10 detect and reuse the swap of debian 9 automatically?
It can, and does. But that may break the existing Debian 9 installation because it changes the swap UUID.

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: Can I dual boot 9 and 10?

#29 Post by MagicPoulp »

Well I have only made a double boot Windows/debian in the past. And it was much simpler. All issues were well documented somewhere, even the MSDOS bcd hack to overrid the windows efi boot to the debian one. All the rest was done just with the mouse.

Why can't a swap partition be usable and compatible for both? WHy does it override the UUID?=

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Can I dual boot 9 and 10?

#30 Post by Dai_trying »

I always tell debian (and any other distros I use) not to use the swap partition, most of them will still pick up and use the partition without the need for an entry in fstab.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Can I dual boot 9 and 10?

#31 Post by Head_on_a_Stick »

Dai_trying wrote:most of them will still pick up and use the partition without the need for an entry in fstab
Only if the drive has a GUID partition table and the distribution is using systemd as PID1.
deadbang

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Can I dual boot 9 and 10?

#32 Post by Dai_trying »

Head_on_a_Stick wrote:
Dai_trying wrote:most of them will still pick up and use the partition without the need for an entry in fstab
Only if the drive has a GUID partition table and the distribution is using systemd as PID1.
I guess most distros I use (or test) must be that way :D

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Can I dual boot 9 and 10?

#33 Post by Head_on_a_Stick »

MagicPoulp wrote:WHy does it override the UUID?=
The swap partition is reformatted (for security reasons, I think) and this changes the UUID.

You could try using the PARTUUID instead, that should remain the same even after reformatting.
deadbang

Post Reply