Skip to content

Instantly share code, notes, and snippets.

@MCMXCIII
Created April 12, 2024 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MCMXCIII/c35fdc8321c03f42e2009da7a0cc20a6 to your computer and use it in GitHub Desktop.
Save MCMXCIII/c35fdc8321c03f42e2009da7a0cc20a6 to your computer and use it in GitHub Desktop.

Exhero install(on vps)

the current lsblk config

root@vultr ~ # lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0 757.8M  1 loop /run/archiso/airootfs
sr0     11:0    1 883.3M  0 rom  /run/archiso/bootmnt
vda    254:0    0    50G  0 disk 
├─vda1 254:1    0   512M  0 part 
└─vda2 254:2    0   4.4G  0 part 
vdb    254:16   0   200G  0 disk 

I wipe the fs in the vda and the vdb is an external storage

I have extracted the tar you gave to the external storage in vdb

I then use wipefs to wipe the vda partition.

root@vultr ~ # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 757.8M 1 loop /run/archiso/airootfs sr0 11:0 1 883.3M 0 rom /run/archiso/bootmnt vda 254:0 0 50G 0 disk vdb 254:16 0 200G 0 disk

I cut the disk with 2 partitions, 1 for efi and one for root final result

root@vultr ~ # lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0 757.8M  1 loop /run/archiso/airootfs
sr0     11:0    1 883.3M  0 rom  /run/archiso/bootmnt
vda    254:0    0    50G  0 disk 
├─vda1 254:1    0     2G  0 part 
└─vda2 254:2    0    48G  0 part 
vdb    254:16   0   200G  0 disk 

Next I label the partitions I use parted to change the type of disk to a EFI partiiton

then to make things easier I label everything mkfs.fat -F 32 /dev/vda1 -n EFI fatlabel /dev/vda1 EFI mkfs.ext4 /dev/vda2 -L Exherbo e2label /dev/vda2 Exherbo

after I mkdir -p /mnt/exherbo to store everything on mount. then mount everything mount /dev/disk/by-label/Exherbo /mnt/exherbo

after I mount the drive where the tarball was extracted in vdb

configuration is currently:

root@vultr ~ # lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0 757.8M  1 loop /run/archiso/airootfs
sr0     11:0    1 883.3M  0 rom  /run/archiso/bootmnt
vda    254:0    0    50G  0 disk 
├─vda1 254:1    0     2G  0 part 
└─vda2 254:2    0    48G  0 part /mnt/exherbo
vdb    254:16   0   200G  0 disk /storage

and the contents of the tar drive is as follows:

root@vultr ~ # cd /storage 
root@vultr /storage # ls
bin   dev  home  lib64  mnt  proc  run   srv  tmp  var
boot  etc  lib   media  opt  root  sbin  sys  usr

I copy everything here to the directory where the chroot will take place. root@vultr /storage # cp -r /storage/* /mnt/exherbo/ I do this in a screen session.

next I change the fstab for the system I just copied.

root@vultr ~ # vim /mnt/exherbo/etc/fstab       
root@vultr ~ # vim /mnt/exherbo/etc/resolv.conf 

with the following files as reference to what the files look like.

root@vultr ~ # cat /mnt/exherbo/etc/fstab
/dev/disk/by-label/Exherbo / ext4 defaults 0 0
/dev/disk/by-label/EFI /boot vfat defaults 0 0
root@vultr ~ # cat /mnt/exherbo/etc/resolv.conf 
nameserver 8.8.8.8
nameserver 8.8.4.4

then I mount the system.

mount -o rbind /dev /mnt/exhero/dev
mount --options bind /sys /mnt/exherbo/sys
mount -t proc none /mnt/exherbo/proc
mount /dev/disk/by-label/EFI /mnt/exherbo/boot
env -i TERM=$TERM SHELL=/bin/bash HOME=$HOME $(which chroot) /mnt/exherbo /bin/bash

then I name things just to be organized.

source /etc/profile
PS1="(Hexherbo) $PS1"

from here I just copy the files in hexsys

I copied the kernel files to a folder inside my home folder(Hope you dont mind.)
 scp -r /home/latte/kernel/* root@108.61.170.82:/boot

then I grub-mkconfig

and reboot.

Faiure to boot from here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment