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.
If you want to run Ubuntu on your Centos machine with only the .iso file you will have to take the .iso file and put it on a usb memory stick and make it bootable.
<OR> burn the .iso to a fresh CD/DVD.
Either way go into the BIOS and set the machine to boot to either 'usb' or the 'CD/DVD Drive'
i think it is possible to point grub to an actual .iso file on the hard drive and tell it to boot from that.
it would then boot into a ubuntu live session, i guess.
actually a quick search seems to confirm this: https://duckduckgo.com/?q=grub+boot+.iso+file
I don't have CentOS installed so I can't test it. I believe CentOS defaulted to Grub2 with 7.0. If you still use Grub Legacy with an older CentOS, you would first have to create a mount point for the iso, then loop mount the iso, create a directory in CentOS, copy all the files/folders from the loop mount point to the new directory and then create a menu entry in either Grub Legacy grub.conf/menu.lst or the Grub2 grub.cfg file.
If you mean that you want to boot ubuntu directly from an iso file then you don't configure the kernel options. You boot to the iso. Not even sure if grub2 can boot to an iso, I know they were working on it.
May have to chain to grub4dos,grub4nt or other loader that can boot an iso directly. Not all iso's will boot this way.
you would first have to create a mount point for the iso,
That wasn't clear. The above statement was in reference to using Grub Legacy to boot an extracted iso file which would then need to be copied to a directory on CentOS and a proper entry made in the grub.conf/menu.lst file.
If you are booting an iso, you just point to it in grub.cfg with Grub2. I usually put it in the / of the filesystem I am booting from but it can also be in the /boot directory and possibly elsewhere. I haven't tried anything else.
Quote:
Yancek the grub config file that you spoke of that we would edit, do you mean the one in the pic that says:
config-3.10.0-327.10.1.el7.x86_64
No. The image you posted shows a Grub directory as well as a Grub2 directory and the grub.cfg file I would expect to find in Grub2.
Grub2 has been able to directly boot iso files for years. I usually boot an iso to install to another partition rather than using a DVD or flash drive. Most any Ubuntu derivative will work and you can also boot a Slackware iso, done that. Probably there are others that I haven't tested but I think there are probably a lot of distributions which cannot be booted directly from iso.
The menuentry below is an example of an entry in the Grub2 grub.cfg file to directly boot the Ubuntu 14.04 iso. It's in the / of the sdb3 partition so that would have to be changed.
Quote:
menuentry "UBUNTU-14.04-iso" {
insmod part_msdos
insmod ext2
set root='hd1,msdos3'
loopback loop (hd1,msdos3)/ubuntu-14.04.2-desktop-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu-14.04.2-desktop-i386.iso
initrd (loop)/casper/initrd.lz
}
If you want this on a permanent basis, put the entry in the /etc/grub.d/40_custom file, save the change and run update-grub or grub-mkconfig, depending upon your system.
Grub2 has been able to directly boot iso files for years. I usually boot an iso to install to another partition rather than using a DVD or flash drive.
I've never done that and I'm having trouble understanding how you were able to complete that task.
I'll do some reading online.
Grub doesn't actually boot the iso file directly. You have to peek into the iso and find some files and create a menu. Almost more trouble than it's worth. This is what the OP I now get was originally asking about.
Grub doesn't actually boot the iso file directly. You have to peek into the iso and find some files and create a menu. Almost more trouble than it's worth. This is what the OP I now get was originally asking about.
I've never done that and I'm having trouble understanding how you were able to complete that task.
If you are booting Ubuntu or one of its derivatives, the menuentries for all will be identical with the exception of the actual name of the iso file and the menuentry title so you won't need to do a loop mount to see what menuentry you need. If you are trying to boot some other distribution, the kernel and initrd path lines will be different so you would need to loop mount the iso. You would then check the syslinux, isolinux or whatever menu you have and modify it to fit Grub2 entries and put them in the grub.cfg file on your primary boot OS partition. I guess that's what jefro is referring to by "peek into the iso and find some files".
Once you know how to do this, it doesn't take any longer than burning a DVD or putting an iso on a flash drive plus you don't need to be buying DVDs and flash drives for the purpose. As I indicated above, there are a lot of distributions which won't work. Most Ubuntus should and a few others, some of which are listed at the link above.
I'm not sure what part of this you are having trouble with?
If you are booting Ubuntu or one of its derivatives, the menuentries for all will be identical with the exception of the actual name of the iso file and the menuentry title so you won't need to do a loop mount to see what menuentry you need.
In this case the derivative is Black Lab Linux that I can easily transfer to my Centos box from my Slack box with a pendrive.
What configuration file does the .iso of Black Lab Linux go in?
Quote:
If you are trying to boot some other distribution, the kernel and initrd path lines will be different so you would need to loop mount the iso.
I would like to try to boot other distributions as a practice but don't understand how to 'loop mount the iso'
-::-I'd be happy not to have to purchase any more flash drives. I stopped burning DVD's a few years ago.-::-
The ISO file may be stored on any partition accessible to GRUB 2. The partition format does not need to be ext3/4.
In that case I can use g-parted to create a new partition.
Ensuring to properly identify the location of the ISO in the menuentry's PATH is what I'm having trouble with.
Once I figure that out the partition will be mounted by Grub2; right?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.