View previous topic :: View next topic |
Author |
Message |
fpemud Guru
Joined: 15 Feb 2012 Posts: 349
|
Posted: Mon Jun 08, 2015 4:13 pm Post subject: Install System Rescue Cd into ESP partition (solved) |
|
|
I know some people put rescue system into the ESP (EFI System Partition). So I think System Rescue Cd is good for this job.
But I have problems.
Step 1:
I copied all the files into /boot/systemrescuecd directory, and add a boot entry for gummiboot:
Code: | fpemud-workstation / # cat /boot/loader/entries/02-rescue.conf
title Rescue boot entry (System Rescue Cd 4.5.2)
efi /systemrescuecd/efi/boot/bootx64.efi |
After I reboot, /boot/systemrescuecd/efi/boot/bootx64.efi successfully loaded, which is a grub efi boot manager.
Step 2:
grub can not find "grub.cfg" which is /boot/systemrescuecd/boot/grub/grub-452.cfg
So I use grub2-mkimage to make a new bootx64.efi which has prefix "/systemrescuecd/boot/grub", after I read the systemrescuecd script.
And I changed all the "/isolinux/..." in grub.cfg to "/systemrescuecd/isolinux/...".
Now I can see the systemrescuecd grub menu after I select "Rescue boot entry" in gummiboot menu.
And all the systemrescuecd files are constrained in /boot/systemrescuecd, which looks tidy.
the modified grub.cfg snippet:
Code: | menuentry "SystemRescueCd (64bit, default boot options)" {
set gfxpayload=keep
linux /systemrescuecd/isolinux/rescue64
initrd /systemrescuecd/isolinux/initram.igz
} |
Step 3:
The systemrescuecd kernel and initrd are loaded. Now initrd can not find "/sysrcd.dat".
Obviously it's another path problem.
systemrescuecd initrd supports "subdir" parameter, so I append "subdir=/systemrescuecd" to kernel command in grub.cfg.
the modified grub.cfg snippet:
Code: | menuentry "SystemRescueCd (64bit, default boot options)" {
set gfxpayload=keep
linux /systemrescuecd/isolinux/rescue64 subdir=/systemrescuecd
initrd /systemrescuecd/isolinux/initram.igz
} |
Step 4:
systemrescuecd now successfully booted.
All the above steps are integrated into project fpemud-kernelmanager.
Command "fpemud-kernelmanager rescue-install" can be used to do the above operations.
Last edited by fpemud on Tue Jun 16, 2015 7:22 am; edited 6 times in total |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Mon Jun 08, 2015 7:21 pm Post subject: |
|
|
I'm not familiar with gummoboot, can it load kernel initrd and pass parameters? If so, it's simple:
the kernel is rescue64
the initrd is initram.igz
the parameter you need to pass is isoloop=systemrescuecd.iso
rescue64 and initram.igz are files you can find in the systemrescuecd.iso /isolinux/ directory (loop mount it and copy those files and the iso itself to your boot partition).
Once loaded the initram.igz will handle mounting the boot partition and finding the systemrescuecd.iso file on it.
GRUB2 does this with a lot of bells and whistles:
Code: |
menuentry "SystemRescueCD 4.4.1 amd64" {
set isofile="systemrescuecd-x86-4.4.1.iso"
loopback loop (hd0,msdos3)/$isofile
linux (loop)/isolinux/rescue64 isoloop=$isofile
initrd (loop)/isolinux/initram.igz
}
|
So grub2 actually extracts rescue64 and initram.igz out of the ISO all by itself! But this feature is unnecessary, you can use this method with any bootloader if you but make those two files available directly. |
|
Back to top |
|
|
fpemud Guru
Joined: 15 Feb 2012 Posts: 349
|
Posted: Mon Jun 15, 2015 12:53 pm Post subject: |
|
|
I have found a good solution for step-2.
Thanks for your suggestion. I didn't know grub is so powerful. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|