Site Search

2017-03-27

Bootstrap / recover Ubuntu Linux using chroot

Especially if you have a dedicated server from Server4You the option below might be what you are looking for to e.g. reinstall another linux kernel version using the recovery boot option:
mdadm --assemble --run /dev/md/0
mdadm --assemble --run /dev/md/1
mdadm --assemble --run /dev/md/2
mkdir /mnt/chroot
mount /dev/md/2 /mnt/chroot
mount /dev/md/0 /mnt/chroot/boot
mount /dev/sda1 /mnt/chroot/boot/efi
mount --bind /proc /mnt/chroot/proc
mount -t sysfs sys /mnt/chroot/sys
mount -o bind /dev /mnt/chroot/dev
mount -t devpts devpts /mnt/chroot/dev/pts
chroot /mnt/chroot