You are not logged in.
I followed the chroot wiki page and the install flash-drive to try and remove my current broken system and replace it with a btrfs snapshot. The problem I face is that btrfs is set up like this
/__active/rootvol/. I found I have to mount the drive like this
/mnt/arch/__active/rootvol/otherwise proc, dev, resovl.conf, etc wont load. Now the issue is I have to be above
__active/rootvolto replace the subvolume as they are all listed as
__active/rootvol/ 2015 21,12I cant replace the current volume cause its mounted. Im in a catch22. And yes I tried doing this from getty but the startup sequence refuses to allow me into a tty!
Is there a way to save my system without having to reinstall? The btrfs subvolumes seem less helpful then I had anticipated.
Any help will be greatly appreciated.
Last edited by jo-shva (2015-12-29 01:09:45)
"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/
Offline
Boot into the snapshot rather than using `chroot`
EDIT: You may also be able to use systemd-nspawn (for the snapshot) from the live environment but I've never tried that.
Last edited by Head_on_a_Stick (2015-12-28 23:26:50)
Jin, Jîyan, Azadî
Offline
Where is usr/{your shell} in the larger picture? What is the exact command line look like?
If it's
/mnt/arch/__active/rootvol/usr/bin/bashthen try
sudo arch-chroot /mnt/arch/__active/rootvolOffline
mount -o subvol= doesn't work? if arch-chroot doesn't work well on that you can also try systemd-nspawn
Offline
I'm not sure how to boot into the snapshot?
its
/mnt/arch/__active/rootvol /bin/bashAre you suggesting i add
mount -o subvol=""to my kernel parameters?
And lastly I have know idea what systemd-nspawn is. I'll try and look it up.
"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/
Offline
kernel param? aren't you trying to chroot? I mean you should mount the subvol you want to chroot into, instead of the default subvol to the mountpoint, e.g.
mount -o subvol=__active/rootvol /dev/sdXY /mnt; arch-chroot /mntOffline
I'm not sure how to boot into the snapshot?
Jin, Jîyan, Azadî
Offline
I'm not sure which is the best way to go. You all have given me 3 options(which is great) first is to chroot into snapshot and repair from there.
The next is to add kernel boot parameters to load into snapshot (and change fstab to match). To repair system.
The last is systemd-nspawn to create a container free of the installed system, to try and remove the old volume and replace with snapshot.
I have no idea which one to choose. Which way is going to be best to remove old volume and replace with snapshot.
"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/
Offline
Thing is I don't know what you're actually trying to do. How exactly is your btrfs structured and why do you need chroot to remove...volume? what volume? Also replace with snapshot? Do you mean you want to boot to a specific snapshot or send a snapshot from one btrfs to another?
Can you use `btrfs subvol list $MOUNTPOUNT_OF_SUBVOL_ID_5` to tell what you're trying to do?
systemd-nspawn is just an alternative to arch-chroot here.
Last edited by tom.ty89 (2015-12-29 00:40:44)
Offline
My btrfs volume got screwed-up(my fault, tried to hibernate to swap partition[not file]).
I have snapshots that can replace the current broken volume.
My problem is that I am unable to enter a tty to do a simple volume replace with snapshot.
So I figured(perhaps incorrectly) that I would need to chroot into the system to remove the current volume and replace it with snapshot.
Thats where I got in to my catch22 because I have to mount the btrfs volume to chroot
/mnt/__active/rootvol/I cant remove it to replace it with a snapshot because I have to be able to remove
__active/rootvolto replace with new.
So I am thinking that systemd-nspawn would probably be the best way to remove the damaged volume and replace with snapshot. Since it is a self contained container. But I am not sure. This is a lot more involved than I had expected. If I could force it to boot into tty that would be the easiest fix. But I don't know if that is even possible.
And I'm not sure, but maybe I didn't even need to chroot, instead just load the Arch install and move the volumes. Would something so simple work? I'll feel like a complete dip**** if it is.
Last edited by jo-shva (2015-12-29 00:57:54)
"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/
Offline
You don't need (arch-)chroot/systemd-nspawn. You just need to boot into a live environment and mount the btrfs and manipulate.
Offline
Seriously. That simple. I'm kicking myself right now!
Thanks for all your help and getting me to find my way from around my elbow back to my thumb.
Cheers!
"Democracy is being allowed to vote for the candidate you dislike least." -- Robert Byrne
http://killhellokitty.deviantart.com/
Offline