The article preview can be found here https://fedoramagazine.org/?p=25356&preview=true.
I reviewed the article, and have some ideas about it I would like to share.
First it has been some time since I have had any reason to modify grub configuration files, and my initial thought was why not use grubby to copy the default menuentry and modify it to suit. None the less I used the provided instructions until I had to try alternative methods for the installation to work. So my first point would be why not use grubby since it makes the user experience better for adding a menu entry by the virtue of being able to copy a working menuentry to make a new one with your own specified kernel and initrd? The drawback being having to modify /boot/grub2/grub.cfg which is only slightly more hazardous than using grub2-mkconfig.
The second thing of note is what behavior grub2-mkconfig has on making the grub.cfg file based upon the contents of /etc/grub.d/, and what the original OS expects to be in the cfg file. So reviewing the /boot/grub2/grub.cfg file is necessary to determine the various files to include in /etc/grub.d/ prior to calling grub2-mkconfig. At the least a link to here should be provided https://docs.fedoraproject.org/en-US/fedora/f29/system-administrators-guide/....
Third is the networking, I used a VM of CentOS 7 to test with, and my networking was by default dhcp, which basically allowed me to drop all networking references in favour of the default behavior. I'm not certain bare metal will be the same, but I think it should.
Fourth, the link provided was not working for the install.img, and I tried it repeatedly finally searching for and finding this one https://dl.fedoraproject.org/pub/alt/stage/29_RC-1.2/Server/x86_64/os/ which worked and I was able to install from the files retrieved, by using the curl instructions provided by the author for getting the vmlinuz and initrd.img, so those links worked.
Finally, this article idea may be better served by splitting it into smaller bits. It is a pretty advanced topic for the normal average user.
The steps I followed were -
1. Create new CentOS 7 VM with Boxes. 2. Follow instructions given in article to use curl to get vimlinuz and initrd.img. 3. Modify grub 40_custom file in /etc/grub.d/ as per directions in article, excepting networking 4. Use grub2-mkconfig to create grub.cfg. 5. Attempt install, fails repeatedly on part 2 of Anaconda installer, something regarding missing dependencies. 6. Use grubby to make menu entry then modify /boot/grub2/grub.cfg to exclude default menuentry kernel commands and options to suit article directions. 7. Find alternative download link to use. (for Anaconda part 2 of install) Modify grub.cfg to suit new link location. 8. Install F29 Server and login
I will document the process I went through and share it with the author. I found using vi was tedious so installed vim-enhanced which provided a better experience.
Comments?
Steve
I would probably avoid running grub-install (or grub). Those commands will overwrite the boot sector of the provided disk with a new copy of grub. There is a danger that the new version might not work for whatever reason (wrong filesystem drivers in second stage loader, etc). Re-writing the bootloader to the boot sector really shouldn't be necessary if you already have a system that is successfully reading /boot/grub2/grub.cfg. Just restart after running grub2- mkconfig and see if your new menu entry exists.
Even better, IMO, would be not to run grub2-mkconfig, but instead to use the "custom.cfg" file where possible. It should be sourced automatically at the end of the existing grub.cfg. Just place the custom.cfg file containing your new menuentry in the /boot/grub2 directory. This option would have the least chance of disrupting/breaking the current configuration.
My last suggestion would be to chainload the "Boot Fedoraproject Org" (BFO) kernel from grub instead of a specific installer kernel ( https://boot.fedoraproject.org/faq). This will only work if the system supports DHCP, but I would expect that most providers provide DHCP.
Just my two cents, please feel free to disregard, gb
On Mon, 2019-03-04 at 20:01 -0500, Steven Snow wrote:
The article preview can be found here https://fedoramagazine.org/?p=25356&preview=true.
I reviewed the article, and have some ideas about it I would like to share.
First it has been some time since I have had any reason to modify grub configuration files, and my initial thought was why not use grubby to copy the default menuentry and modify it to suit. None the less I used the provided instructions until I had to try alternative methods for the installation to work. So my first point would be why not use grubby since it makes the user experience better for adding a menu entry by the virtue of being able to copy a working menuentry to make a new one with your own specified kernel and initrd? The drawback being having to modify /boot/grub2/grub.cfg which is only slightly more hazardous than using grub2-mkconfig.
The second thing of note is what behavior grub2-mkconfig has on making the grub.cfg file based upon the contents of /etc/grub.d/, and what the original OS expects to be in the cfg file. So reviewing the /boot/grub2/grub.cfg file is necessary to determine the various files to include in /etc/grub.d/ prior to calling grub2-mkconfig. At the least a link to here should be provided https://docs.fedoraproject.org/en-US/fedora/f29/system-administrators-guide/....
Third is the networking, I used a VM of CentOS 7 to test with, and my networking was by default dhcp, which basically allowed me to drop all networking references in favour of the default behavior. I'm not certain bare metal will be the same, but I think it should.
Fourth, the link provided was not working for the install.img, and I tried it repeatedly finally searching for and finding this one https://dl.fedoraproject.org/pub/alt/stage/29_RC-1.2/Server/x86_64/os/ which worked and I was able to install from the files retrieved, by using the curl instructions provided by the author for getting the vmlinuz and initrd.img, so those links worked.
Finally, this article idea may be better served by splitting it into smaller bits. It is a pretty advanced topic for the normal average user.
The steps I followed were -
- Create new CentOS 7 VM with Boxes.
- Follow instructions given in article to use curl to get vimlinuz and initrd.img.
- Modify grub 40_custom file in /etc/grub.d/ as per directions in article, excepting networking
- Use grub2-mkconfig to create grub.cfg.
- Attempt install, fails repeatedly on part 2 of Anaconda installer, something regarding missing dependencies.
- Use grubby to make menu entry then modify /boot/grub2/grub.cfg to exclude default menuentry kernel commands and options to suit article directions.
- Find alternative download link to use. (for Anaconda part 2 of install) Modify grub.cfg to suit new link location.
- Install F29 Server and login
I will document the process I went through and share it with the author. I found using vi was tedious so installed vim-enhanced which provided a better experience.
Comments?
Steve
Fedora Magazine mailing list -- magazine@lists.fedoraproject.org To unsubscribe send an email to magazine-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/magazine@lists.fedoraproject.o...
Thanks gb,
Grub-install is not recommended to be run anywhere in the article, although it is at the link I specified as an option to include. Indeed the author uses the 40_custom file in etc/grub.d for modifying the menuentry, as per the recommended way fedora suggests for easy grub configuration. I found (in the past, and this time too) that grubby was a better fit due to it's available commands for these things and in either case you're messing with the grub.cfg file in /boot. I too wondered about the the BFO, although I could only find iso's and the point I thought was to do this without an USB or CD only network capabilities. Whic brings up a fifth point I neglected to mention that I had done this via a VM and had access to the Internet for documentation. someone doing this with only the single PC and setup as the VM was, would have a very difficult time getting through if they weren't already knowledgeable on the subject matter. Sorry the preview link didn't work. I didn't realise it when I sent the email.
Steve
On 05/03/19 11:03 AM, Gregory Lee Bartholomew wrote:
I would probably avoid running grub-install (or grub). Those commands will overwrite the boot sector of the provided disk with a new copy of grub. There is a danger that the new version might not work for whatever reason (wrong filesystem drivers in second stage loader, etc). Re-writing the bootloader to the boot sector really shouldn't be necessary if you already have a system that is successfully reading /boot/grub2/grub.cfg. Just restart after running grub2- mkconfig and see if your new menu entry exists.
Even better, IMO, would be not to run grub2-mkconfig, but instead to use the "custom.cfg" file where possible. It should be sourced automatically at the end of the existing grub.cfg. Just place the custom.cfg file containing your new menuentry in the /boot/grub2 directory. This option would have the least chance of disrupting/breaking the current configuration.
My last suggestion would be to chainload the "Boot Fedoraproject Org" (BFO) kernel from grub instead of a specific installer kernel ( https://boot.fedoraproject.org/faq). This will only work if the system supports DHCP, but I would expect that most providers provide DHCP.
Just my two cents, please feel free to disregard, gb
On Mon, 2019-03-04 at 20:01 -0500, Steven Snow wrote:
The article preview can be found here https://fedoramagazine.org/?p=25356&preview=true.
I reviewed the article, and have some ideas about it I would like to share.
First it has been some time since I have had any reason to modify grub configuration files, and my initial thought was why not use grubby to copy the default menuentry and modify it to suit. None the less I used the provided instructions until I had to try alternative methods for the installation to work. So my first point would be why not use grubby since it makes the user experience better for adding a menu entry by the virtue of being able to copy a working menuentry to make a new one with your own specified kernel and initrd? The drawback being having to modify /boot/grub2/grub.cfg which is only slightly more hazardous than using grub2-mkconfig.
The second thing of note is what behavior grub2-mkconfig has on making the grub.cfg file based upon the contents of /etc/grub.d/, and what the original OS expects to be in the cfg file. So reviewing the /boot/grub2/grub.cfg file is necessary to determine the various files to include in /etc/grub.d/ prior to calling grub2-mkconfig. At the least a link to here should be provided https://docs.fedoraproject.org/en-US/fedora/f29/system-administrators-guide/....
Third is the networking, I used a VM of CentOS 7 to test with, and my networking was by default dhcp, which basically allowed me to drop all networking references in favour of the default behavior. I'm not certain bare metal will be the same, but I think it should.
Fourth, the link provided was not working for the install.img, and I tried it repeatedly finally searching for and finding this one https://dl.fedoraproject.org/pub/alt/stage/29_RC-1.2/Server/x86_64/os/ which worked and I was able to install from the files retrieved, by using the curl instructions provided by the author for getting the vmlinuz and initrd.img, so those links worked.
Finally, this article idea may be better served by splitting it into smaller bits. It is a pretty advanced topic for the normal average user.
The steps I followed were -
- Create new CentOS 7 VM with Boxes.
- Follow instructions given in article to use curl to get vimlinuz and initrd.img.
- Modify grub 40_custom file in /etc/grub.d/ as per directions in article, excepting networking
- Use grub2-mkconfig to create grub.cfg.
- Attempt install, fails repeatedly on part 2 of Anaconda installer, something regarding missing dependencies.
- Use grubby to make menu entry then modify /boot/grub2/grub.cfg to exclude default menuentry kernel commands and options to suit article directions.
- Find alternative download link to use. (for Anaconda part 2 of install) Modify grub.cfg to suit new link location.
- Install F29 Server and login
I will document the process I went through and share it with the author. I found using vi was tedious so installed vim-enhanced which provided a better experience.
Comments?
Steve
Fedora Magazine mailing list -- magazine@lists.fedoraproject.org To unsubscribe send an email to magazine-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/magazine@lists.fedoraproject.o...
magazine@lists.fedoraproject.org