From 0fd1b8a98b4d31a97070a983114e18bc6f9a7290 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Tue, 28 Feb 2017 19:40:17 +0000 Subject: core reboot re-added grub and rescue iso --- core/reboot.html | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/core/reboot.html b/core/reboot.html index fd1adfc..c60265a 100644 --- a/core/reboot.html +++ b/core/reboot.html @@ -54,6 +54,80 @@ # pkgadd /usr/ports/packages/linux-libre#4.9.11-2.pkg.tar.gz +

1.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.30-crux
+        Found initrd image: /boot/initramfs-4.1.30-crux.img
+        done
+        #
+        
+ +

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

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

Rescue iso

+ +

Simple way to have "resque" system is to mount boot as read only, + this assures that even as root nothing can be changed without remount. + To have different system independent from host grub will have entry to + boot small iso on /boot partition;

+ +

Crux iso is not used because at the moment it fails to + find "crux-media" during or after init.

+ +
+        $ wget http://ftp.nluug.nl/os/Linux/distr/tinycorelinux/7.x/x86/release/CorePlus-current.iso
+        $ sudo mv CorePlus-current.iso /boot/tinycore.iso
+        
+ +

Edit /etc/grub.d/40_custom

+ +
+
+        menuentry "Rescue" {
+            load_video
+            set gfxpayload=keep
+
+            set isofile="/tinycore.iso"
+            loopback loop $isofile
+            linux (loop)/boot/vmlinuz64 loglevel=3 cde
+            initrd (loop)/boot/corepure64.gz
+        }
+
         

1.4.4. Checkup

If you have qemu installed you can see if it boots, in this -- cgit 1.4.1-2-gfad0