LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2019, 10:33 AM   #1
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Rep: Reputation: Disabled
mounting .iso-file using grub command(s)


Hi,

does anyone know whether itīs possible to mount an .iso-file which is located in my /home-partition, directly from grub2?
But not using the method of creating a menuentry in /etc/grub.d/40_custom . Iīve found some documentation referring to that.

What Iīm looking for is a command sequence that I can enter in the grub-shell.

Thanks a lot in advance.

Greetings.
Rosika
 
Old 04-09-2019, 01:23 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,551

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
THe link below is to the Grub2 manual and as you can see under the list of commands available, mount is not one of them. If you want to know if you can boot an iso directly from the Grub menu, the answer is yes. See the 2nd link below.

https://www.gnu.org/software/grub/manual/grub/grub.html

https://www.howtogeek.com/196933/how...ur-hard-drive/
 
Old 04-10-2019, 07:24 AM   #3
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi yancek,

thanks for your answer.
So basically I have to create a menuentry in /etc/grub.d/40_custom. Thatīs what I wanted to know.
Itīs a bit of a shame though, as I have to edit the respective file each time I want to swap ISOs.
Never mind.

One additional question:

Grub2, when using the command line, gives me
Code:
ls : /hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd2) (hd2,msdos1) (fd0)
as available partitions.
So in /etc/grub.d/40_custom instead of
Code:
loopback loop (hd0,2)$isofile
Iīd have to type
Code:
loopback loop (hd0,msdos2)$isofile
, right?

Gretings
Rosika
 
Old 04-10-2019, 11:54 AM   #4
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi,

I tried it out and in fact you can boot into an .iso directly from grub by typing in commands. In my case:

Code:
 > set isofile="/home/rosika/Desktop/Dokumente/prov_bionic/zu_xubuntu/xubuntu-18.04.2-desktop-i386.iso"
 > loopback loop (hd0,msdos2)$isofile
 > linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject 
 > initrd (loop)/casper/initrd  
 > boot
The final "boot"-command triggers it off.

The thus mounted xubuntu worked well. I tried it out as a live-system.

Yet when shutting it down I noticed in the shutdown-logs that there were 2 "failed"-messages. I believe they referred to
unmounting of something. Yet the shutdown proceeded without any difficulties.

When powering up my installed Lubuntu afterwards however I got a "Started file system check" message. And the check was done accordingly. After that my system booted normally.

My question is: Am I right in assuming that the two described phenomena are correlated?

Cheers
Rosika
 
Old 04-10-2019, 02:07 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,551

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
Quote:
So basically I have to create a menuentry in /etc/grub.d/40_custom.
No. It depends upon what you want to do. If you want to boot and use the iso multiple times, that is the best method. If you want to boot it once for the prupose of installing it to a hard drive, better to just put the entry in grub.cfg. If you do this, don't update grub as it will remove the entry.

Yes, you can as you found just enter the complete menuentry on boot as you did. Just a lot of typing. As far as the error messages you got, I"m not sure without knowing the exact message.
 
Old 04-11-2019, 06:17 AM   #6
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Thanks yancek for your reply.

Quote:
Yes, you can as you found just enter the complete menuentry on boot as you did. Just a lot of typing
Yes, youīre right. I found that out the hard way, too.

Quote:
If you want to boot it once for the prupose of installing it to a hard drive, better to just put the entry in grub.cfg. If you do this, don't update grub as it will remove the entry.
Thatīs a very useful info. Thanks a lot.

Yet after trying out mounting a xubuntu-iso from grub yesterday Iīm expriencing another problem with my main system:

Just to clarify: My physical system is Lubuntu.

When I now run
Code:
sudo iftop -i wlxe4beed63ad6d
my ip-address is displayed correctly with DNS resolution off. But with DNS resolution on I get xubuntu as displayed name!!!!!!!

Thatīs only after yesterdayīs experiment with mounting the xubuntu-iso from grub.

So do you have any ideas what could be amiss here?

Greetings.
Rosika
 
Old 04-11-2019, 07:01 AM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,551

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
Quote:
So do you have any ideas what could be amiss here?
Not really. You turn DNS resolution off how, on Lubuntu? And run the command from Lubuntu/Xubuntu?
 
Old 04-11-2019, 07:22 AM   #8
Rosika
Member
 
Registered: Apr 2017
Distribution: Lubuntu 64 bit
Posts: 280

Original Poster
Rep: Reputation: Disabled
Hi,

Quote:
You turn DNS resolution off how, on Lubuntu? And run the command from Lubuntu/Xubuntu?
Iīm running the iftop-command from my Lubuntu main system. I can toggle resolution on/off by hitting the "n"-key.

Curious thing though:

I have two profiles for my WLAN-connection. One is with DHCP automatically, the other is a profile
with which I assign a defined ip-address.
But only using the first one gives me "xubuntu". The latter one gives me "rosika@rosika-Lenovo-H520e", as it used to be.
(And indeed, I used the first one with the xubuntu-iso.)

All of this leads me to believe that the issue is with the router......

Greetings.
Rosika
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
Extract ISO to HD, create ISO from Extractions, Boot ISO LemensTS Linux - Software 1 12-28-2010 01:10 PM
how to make non bootable iso file and iso via linux command line?? npubudu Linux - Newbie 2 02-01-2009 11:31 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
Does anyone Know how to open either .iso.rz or these .iso.xdelta,.iso.bz2,.iso.lzma?? maximalred Debian 5 06-09-2004 06:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration