Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # mount the rootfs somewhere
- mount /dev/sda1 /mnt/root
- # also if you have a separate /boot, mount that also, eg.
- mount /dev/sda2 /mnt/root/boot
- cd /mnt/root
- # next 4 lines: general, non-arch based (works for arch too, but pacman won't work within chroot)
- mount -o rbind /dev dev
- mount -o rbind /proc proc
- mount -o rbind /sys sys
- chroot /mnt/root
- # next 1 line: archlinux based (requires arch-install-scripts package)
- arch-chroot /mnt/root
- blkid
- vim /etc/fstab
- make sure UUIDs are right
- # If you dual boot, and grub is chainloaded, disk is more like /dev/sda1 rather than /dev/sda
- grub-install $disk
- # in some distros, it's /boot/grub2/grub.cfg; for debian and arch, "update-grub" does the same.
- grub-mkconfig -o /boot/grub/grub.cfg
- vim /boot/grub/grub.cfg
- (optional)
- Make sure UUIDs are right.
- If you are not using uuids, but using /dev/sdX names instead, I highly recommend changing now to use UUIDs instead.
- #debian based: (not sure if it's -c or -u)
- update-initramfs -u
- #openSUSE:
- mkinitrd
- #arch/manjaro; replace "linux" with your kernel name. List first with ls.
- mkinitcpio -p /etc/mkinitcpio.d/linux.preset
- #arch/manjaro alternative; (add kernel version in there, based on filenames in /lib/modules/)
- mkinitramfs -g /boot/initramfs-...-x86_64.img -k ...
- exit
- #optional... unmount
- cd /
- # next 1 line: general, non-arch based
- umount /mnt/root/*
- umount /mnt/root
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement