From 05c1ad5f7378e421f8ea06fb55e44ec773f0f055 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Sat, 20 Aug 2016 07:16:45 +0100 Subject: added skeletons to install --- core/reboot.html | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 core/reboot.html (limited to 'core/reboot.html') diff --git a/core/reboot.html b/core/reboot.html new file mode 100644 index 0000000..fd932ea --- /dev/null +++ b/core/reboot.html @@ -0,0 +1,124 @@ + + + + + 1.4. Prepare Reboot + + + + Core OS Index +

1.4. Prepare for Reboot

+ +

This instructions are done + inside chroot.

+ +

1.4.1. Linux Kernel

+ +
+        # cp /iso/crux/kernel/* /usr/src/
+        # cd /usr/src
+        # cp linux-4.1.13.defconfig linux-4.1.13/.config
+        # cd linux-4.1.13
+        
+ +
+        # make all
+        # make modules_install
+        # cp arch/x86_64/boot/bzImage /boot/vmlinuz-4.1.13
+        # cp System.map /boot/System.map-4.1.13
+        
+ +

4.2. Dracut - Initramfs

+ +

Copy dracut port from sysdoc to root home directory;

+ +
+        # exit
+        # cp -R /home/user/sysdoc/ports/dracut $CHROOT/root/
+        
+ +

Inside chroot;

+ +
+        # cd /root/dracut
+        # pkgmk -d
+        # pkgadd pkgadd /srv/ports/packages/dracut#044-2.pkg.tar.gz
+        
+ +

Run dracut to create init ram filesystem;

+ +
+        # dracut -v -H --fstab  /boot/initramfs-4.1.13 4.1.13
+        
+ +

4.3. Configuring Grub2

+ +

Create grub file in /etc/default/grub with values;

+ +
+        GRUB_DISABLE_LINUX_UUID=false
+        GRUB_ENABLE_LINUX_LABEL=false
+        
+ +

Grub Manual, + install grub on MBR of disk sdb;

+ +
+        # grub-install /dev/sdb
+        Installation finished. No error reported.
+        
+ +

If you are installing on removable media;

+ +
+        # grub-install --removable /dev/sdb
+        Installation finished. No error reported.
+        
+ +

grub-mkconfig generates grub.cfg, it will try to discover + available kernels and attempt to generate menu entries for + them;

+ +
+        # grub-mkconfig -o /boot/grub/grub.cfg
+        Generating grub.cfg ...
+        Found linux image: /boot/vmlinuz-4.1.13-gnu_crux
+        Found initrd image: /boot/initramfs-4.1.13-gnu_crux.img
+        done
+        #
+        
+ +

Check /boot/grub/grub.cfg, if is wrong add menu to + /etc/grub.d/40_custom, replace correct msdos partition + from grub-prob output and correct UUID from fstab or blkid

+ +
+        # grub-probe --target=hints_string /
+        
+ +

4.4. Checkup

+ +

If you have qemu installed you can see if it boots, in this + example sdb is usb external drive;

+ +
+        # qemu-system-x86_64 -curses -usb -usbdevice disk:/dev/sdb
+        
+ +
+        # qemu-system-x86_64 -kernel /boot/vmlinuz-linux -initrd /boot/initramfs-linux.img -append root=/dev/sdb /dev/sdb2
+        
+ +
+	# qemu-img convert crux-img.qcow2 -O raw crux.img
+	# dd if=crux.img of=/dev/sdX
+	
+ + Install Index +

This is part of the SysDoc Manual. + Copyright (C) 2016 + Silvino Silva. + See the file Gnu Free Documentation License + for copying conditions.

+ + -- cgit 1.4.1-2-gfad0