Problem since installing Dual Boot (SOLVED)

Hi Mark,
not sure what has gone wrong, see below

degsy@degsy-MM061 ~ $ sudo mount /dev/sda1 /mnt
[sudo] password for degsy:
mount: /dev/sda1 already mounted or /mnt busy
mount: according to mtab, /dev/sda1 is already mounted on /mnt
degsy@degsy-MM061 ~ $ for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
degsy@degsy-MM061 ~ $ sudo chroot /mnt
chroot: failed to run command ‘/bin/bash’: Exec format error
degsy@degsy-MM061 ~ $ for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
degsy@degsy-MM061 ~ $ sudo chroot /mnt
chroot: failed to run command ‘/bin/bash’: Exec format error
degsy@degsy-MM061 ~ $ apt-get install --reinstall lightdm
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
degsy@degsy-MM061 ~ $

Degsy

ok looks like you probably have one 32bit distro and one 64bit … so we’re not going to be able to chroot from Peppermint

it also looks like they are sharing a swap partition … I’m not sure if that’s the problem here.

What happens if you boot to the Ubuntu login screen, enter a text console, then run:

sudo swapoff -a

then

sudo service lightdm restart

wow, that works Mark.
Took me back to the log in screen and then accepted my password and logged in,in fact this reply is from the Ubuntu OS. Is there something else I need to do to ensure this works in future, or is the problem solved?

Many many thanks again, Mark, brilliant.

Degsy

No it’s NOT solved … the problem is that both Ubuntu and Peppermint are sharing a swap partition.

You may be able to get away with this if they’re both the same architecture, but it looks like you can’t if they aren’t … it’s probably not a great idea anyway, specially if you ever use hibernation.

The only reason Ubuntu is currently working is we’ve switched swap off … enabling it again would either stop Ubuntu working, or stop Peppermint working.

Ideally you’d (from Ubuntu), resize the /dev/sda6 (peppermint partition) leaving space after it for another swap partition … create that swap partition, edit Ubuntu’s fstab file to point at the new swap partition … then re-enable swap.

Before we do that, what’s the output from:

free -m

Hi Mark,
Output as requested:
derek@derek-MM061:~$ free -m
total used free shared buffers cached
Mem: 1488 1278 210 186 41 556
-/+ buffers/cache: 680 808
Swap: 0 0 0
derek@derek-MM061:~$
Degsy

Yep, you’re going to NEED a swap partition for Ubuntu

Do you have a Peppermint or Ubuntu LiveCD/LiveUSB ?

I have both, the Peppermint 6 is the most recent of them.

Cheers,
Degsy

Do you know how to boot the Peppermint LiveCD/LiveUSB, then use Gparted to shrink the /dev/sda6 partition leaving around 3 - 4GB after it on the disk … then create a new partition of the type "linux-swap using that 3 - 4GB space ?

I think it would be safer if you gave me instructions , please Mark.

Thanks,
Degsyj

From Ubuntu, can you post the contents of

gedit /etc/fstab

As requested:

/etc/fstab: static file system information.

Use ‘blkid’ to print the universally unique identifier for a

device; this may be used with UUID= as a more robust way to name devices

that works even if disks are added and removed. See fstab(5).

/ was on /dev/sda1 during installation

UUID=7b933a4f-ce32-4726-b52d-427d2d154956 / ext4 errors=remount-ro 0 1

swap was on /dev/sda5 during installation

UUID=b73c8a18-387e-4f10-a296-4c9363cd4d7c none swap sw 0 0

Degsy

I’ll type something up this evening … gotta go out for a bit.

If I were you I’d stick to Peppermint until we fix this.

No problem, happy to do that, thank you for your time.

Degsy

Okay, boot to the Peppermint LiveCD/LiveUSB

Open menu > System Tools > Gparted

in Gparted, make sure /dev/sda is selected top right on the toolbar

right-click /dev/sda6 in the partition list, and select Resize/Move

Change Free space following (MiB): 3072

Click the Resize button.

Click the Apply button (on the toolbar).

When complete … right-click the empty space following /dev/sda6 and select New

In the resulting dialog, leave all settings as they are, except change File system: linx-swap

Click the Add button.

Click the Apply button (on the toolbar).

When that’s done, close everything and reboot into Ubuntu.

In Ubuntu run:

sudo fdisk -l

and

sudo blkid

and post the output back here

Hi Mark,
Carried out your instructions and here are the outputs you asked for:

derek@derek-MM061:~$ sudo fdisk -l
[sudo] password for derek:

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001c80a

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 172790376 86394164+ 83 Linux
/dev/sda2 172791806 234440703 30824449 5 Extended
/dev/sda5 231317504 234440703 1561600 82 Linux swap / Solaris
/dev/sda6 172791808 225026047 26117120 83 Linux
/dev/sda7 225028096 231315455 3143680 82 Linux swap / Solaris

Partition table entries are not in disk order
derek@derek-MM061:~$ sudo blkid
/dev/sda1: UUID=“7b933a4f-ce32-4726-b52d-427d2d154956” TYPE=“ext4”
/dev/sda5: UUID=“b73c8a18-387e-4f10-a296-4c9363cd4d7c” TYPE=“swap”
/dev/sda6: UUID=“b5cba5e4-ca3b-4bc2-81c2-cf10fab29851” TYPE=“ext4”
/dev/sda7: UUID=“dfa63e69-af4f-47ae-883d-8d090067bf29” TYPE=“swap”
derek@derek-MM061:~$

Hope this is OK,

Degsy

OK in Ubuntu run:

sudo gedit /etc/fstab

find the line that reads

UUID=b73c8a18-387e-4f10-a296-4c9363cd4d7c none            swap    sw              0       0

and change it to read:

UUID=dfa63e69-af4f-47ae-883d-8d090067bf29 none            swap    sw              0       0

SAVE the file and exit gedit, back in the terminal run:

sudo swapon -a

then REBOOT back into Ubuntu

Once rebooted into Ubuntu, post the output from:

free -m

As requested:

derek@derek-MM061:~$ free -m
total used free shared buffers cached
Mem: 1488 1039 449 150 91 497
-/+ buffers/cache: 450 1038
Swap: 3069 0 3069
derek@derek-MM061:~$

Thanks again mark for your time and help,

Degsy

That’s perfect, Ubuntu now has its own working swap partition … if both Ubuntu and Peppermint now boot without issue, you’re all done…

and you’re most welcome Degsy :slight_smile:

Thank you Mark, just one very small issue, which has just cropped up, when I boot to peppermint 6 I now get the scanning btrfs file system thing come up, it does load but this slows things down, seem to remember this came up before as a topic but cant find the solution, is it quick and simple?
Will then mark this thread as solved,

once again thanks for the help, time and most of all your patience.

Cheers,
Degsy

OK Mark, found the answer I was looking for on the Peppermint Forum, knew I had read this before, so will now mark as Solved.

Cheers,
Degsy