CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Either would work. If you put it in /boot/grub/grub.cfg file, do NOT run grub-mkconfig. Put it right below your CentOS menuentry.
If you put it in /etc/grub.d/40_custom then you MUST run grub-mkconfig. Make sure you change the set root line to below as it is on sda1. Also, the iso name has to be exact if you don't have the same one listed below. Running grub-mkconfig is shown at the link below. I would suggest you put the iso in the /boot directory as it is more likely to boot but you can try it from the Downloads directory. Obviously, if you do move it to the /boot directory, you need to change the path on the loopback and linux lines to reflect that.
Quote:
menuentry "black lab" {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
loopback loop (hd0,msdos1)/black-lab-702-x86_64.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/black-lab-702-x86_64.iso
initrd (loop)/casper/initrd.gz
}
Where was the grub.cfg file or is it grub2.cfg? According to the information I could find on the Red Hat and CentOS sites, it should be in the /boot/grub2 directory. Post back your results. I don't think it will boot the iso directly with CentOS so I would be interested to know if it worked.
I also tried 'yum update grub as root' and the result was the same.
After adding the black lab menu entry to the /boot/grub2/grub.cfg file and rebooting it didn't work.
My Vaio booted directly into CentOS 7.
I downloaded and installed CentOS 7 to check it out. The grub.cfg file was in the /boot/grub2 directory. The reason you previously saw the grub.cfg file as empty is because you tried to open it as a normal user. Did this to test and got the same message you posted earlier and an empty file showing. No problem with it as root.
I moved the black lab iso to the / of the CentOS partition and used the loopback entry pointing to it and it failed with the message:
Quote:
no server is found, you need to load the kernel first
I extracted the black lab directories/files from the iso and copied them to the / of CentOS and then changed the menuentry path to the kernel (vmlinuz) and initrd in the CentOS grub.cfg file and once again it failed with the message:
Quote:
file /casper/vmlinuz not found, you need to load the kernel first.
I've booted extracted Linux iso files dozens of times with various Linux distributions using Grub Legacy and Grub2 and this is the first time I can recall not being able to boot an extracted iso from /. Booting an iso usually fails unless you are using one of the Ubuntus so that was no surprise.
Yes, that is expected behavior because only the Ubuntus and maybe Debian use update-grub. It's just a stub pointing to the grub-mkconfig command. Look at the link in my last post for the exact command. If you put the entry in grub.cfg, do NOT run grub-mkconfig as it will remove that entry. Just save and reboot. If you had put the entry in the /etc/grub.d/40_custom, then you would run grub-mkconfig.
I've done this dozens of times with various Linux distributions
-::-Clearly, you have the experience with this that I don't.-::-
I won't give up so easily yancek, but I have to leave it alone for a while it's no longer enjoyable and challenging like it first was.
No. Results explained in my last post. I don't know how to 'load the kernel first' in this instance either. Generally, you would have a correct path to where the kernel is. I was not surprised the iso didn't boot, most systems won't boot an iso copied to a partition but most Linux systems I have used will boot an extracted iso copied to the / of a partition. I might try some different options is I have the time as I find it interesting, to a point.
I'm happy to report a yes to that question now. Another PEBKAC error, embarassing. I had the set root line pointing to the wrong drive as CentOS was on an external drive. I noticed this morning the CentOS menuentry had a set root of hd0,msdos11 and I had been using hd1,msdos11 because it was an external drive. So what did work is having the actual iso file for blacklab in the / of the CentOS partition and booting it from sdb11 using the grub.cfg menuentry below. I was able to navigate through the filesystem and start the installer:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.