You are not logged in.

#21 2017-07-11 23:32:49

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: can't boot after updating :(

Quick cheatsheet:

sudo -i
mkdir -p /mnt/chroot   # call it what you like :)
mount /dev/sdXZ /mnt/chroot

for i in /proc /sys /dev /dev/pts; do mount --bind $i /mnt/chroot$i; done

#start root shell in chrooted partition
chroot /mnt/chroot /bin/bash

Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#22 2017-07-12 01:03:41

KrunchTime
Member
Registered: 2015-09-29
Posts: 857

Re: can't boot after updating :(

OK, I was able to chroot into my Unstable partition.  However, when I attempted to apt update, the repos used were from the applicable apt configuration files on my BL-Hydrogen partition, not on my BL-Unstable partition.

I don't know if it matters, but when I attempted to

cp /etc/resolv.conf $TARGET/etc/

I received the following error message:

cp: not writing through dangling symlink '/media/sda3/etc/resolv.conf'

sda3 is the partition containing BL-Unstable.

Apologies if I've hijacked for hijacking duckie's thread.  :8

Last edited by KrunchTime (2017-07-12 03:10:47)

Offline

#23 2017-07-12 06:53:39

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,077
Website

Re: can't boot after updating :(

KrunchTime wrote:

I assume the sudo su is the chroot part.

Edit:  My assumption was correct.

No and nope, respectively.

`sudo su` just attains a (non-login) root shell, the chrooting is done by... the `chroot` command  big_smile

KrunchTime wrote:

when I attempted to apt update, the repos used were from the applicable apt configuration files on my BL-Hydrogen partition, not on my BL-Unstable partition

You must have done it wrong then.

Try again from the very top and this time please be sure to post the actual terminal output rather than a vague description and please include your terminal inputs in the post so that we can see if you have made a mistake anywhere.

The "cheetsheet" given by damo in this post will get the job done, there is no need to copy resolv.conf anywhere  wink

Offline

#24 2017-07-14 01:00:14

KrunchTime
Member
Registered: 2015-09-29
Posts: 857

Re: can't boot after updating :(

damo wrote:

Quick cheatsheet:

sudo -i
mkdir -p /mnt/chroot   # call it what you like :)
mount /dev/sdXZ /mnt/chroot

for i in /proc /sys /dev /dev/pts; do mount --bind $i /mnt/chroot$i; done

#start root shell in chrooted partition
chroot /mnt/chroot /bin/bash

To complete damo's cheatsheet...
When you're finished, CTRL-D to exit chroot, then:

umount -R /mnt
exit

Edited per HoaS's response below.

Last edited by KrunchTime (2017-07-14 06:17:25)

Offline

#25 2017-07-14 05:57:08

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,077
Website

Re: can't boot after updating :(

KrunchTime wrote:
for i in /proc /sys /dev /dev/pts; do umount -l /mnt/chroot$i; done
umount -l /dev/sdXZ
exit

I don't think you can control the device nodes from the chroot so `exit` would have to be called first wink

Simpler version:

exit
umount -R /mnt
exit

Or just call `reboot` after exiting the chroot — systemd will make sure everything is umounted correctly before shutting down

Last edited by Head_on_a_Stick (2017-07-14 06:07:04)

Offline

#26 2017-07-14 06:03:07

KrunchTime
Member
Registered: 2015-09-29
Posts: 857

Re: can't boot after updating :(

Head_on_a_Stick wrote:

I don't think you can control the device nodes from the chroot so `exit` would have to be called first wink

KrunchTime wrote:

When you're finished, CTRL-D to exit chroot,

Last edited by KrunchTime (2017-07-14 06:05:01)

Offline

#27 2017-07-14 06:07:24

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,077
Website

Re: can't boot after updating :(

^ D'oh! Sorry!  :8

Anyway, `umount -R /mnt` is all that is needed.

There is no need to also attempt `umount` on /dev/sdXY afterwards; generally speaking the command should be used on the mount point rather than the device.

Last edited by Head_on_a_Stick (2017-07-14 06:08:49)

Offline

#28 2017-07-14 06:08:57

KrunchTime
Member
Registered: 2015-09-29
Posts: 857

Re: can't boot after updating :(

Head_on_a_Stick wrote:

^ D'oh! Sorry!  :8

Not a problem.

Head_on_a_Stick wrote:

Anyway, `umount -R /mnt` is all that is needed.

There is no need to also attempt `umount` on /dev/sdXY afterwards; generally speaking the command should be used on the mount point rather than the device.

Thank you.  I'll change my response.

Last edited by KrunchTime (2017-07-14 06:15:24)

Offline

Board footer

Powered by FluxBB