LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-13-2020, 07:28 AM   #1
zdolar
Member
 
Registered: Jul 2009
Location: Slovenija
Distribution: Slackware
Posts: 84

Rep: Reputation: 12
mount iso in single user mode


Hi!

Virtualbox Slackware64-current
I somehow lost a few files in a folder /etc/pam.d.
So I can not boot root (or any other user).
I can boot into a single user mode and
Code:
/sbin/mount /dev/sda1 / -o remount,rw
works, so I can access the system read/write.
I wish to copy missing files from another working VBOX Slackware (same version).
I've created an ISO image from a working /etc/pam.d with all files included.

When I want to mount that ISO, I got:
Code:
mount: /mnt/dvd: mount failed: Operation not permitted.
If I try to force -ro mount, then I got:
Code:
mount: /mnt/dvd: can't find in /etc/fstab.
How to mount ISO to copy files from it?
Is there any other option? - There's no network, no modules, so I see only ISO mount possible.
 
Old 07-13-2020, 07:39 AM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 2,531

Rep: Reputation: 792Reputation: 792Reputation: 792Reputation: 792Reputation: 792Reputation: 792Reputation: 792
mount iso in single user mode

what command are you using to mount the iso file?

it looks like you might be missing something.
 
Old 07-13-2020, 08:07 AM   #3
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,494

Rep: Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800Reputation: 800
mount -t iso9660 -o loop /<path to iso> /<path to mount point>
 
Old 07-13-2020, 08:11 AM   #4
zdolar
Member
 
Registered: Jul 2009
Location: Slovenija
Distribution: Slackware
Posts: 84

Original Poster
Rep: Reputation: 12
Quote:
Originally Posted by rkelsen View Post
what command are you using to mount the iso file?

it looks like you might be missing something.
/sbin/mount /dev/sr0 /mnt/tmp

And I found out, there's no /dev/sr*

In a mean time, I simply added another working instance as a secondary drive to VirtualBox. At boot I had /dev/sda1 (root) and /dev/sdb1 - another working slackware64-current Virtualbox drive. I copied files as mentioned in a previous post.
And at next boot, the system booted normally.

So my main problem is solved, but I'm still interested, how to mount ISO image from a single user mode.
 
Old 07-13-2020, 08:25 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 20,218

Rep: Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458Reputation: 3458
Did you copy the ISO file from the working guest to the host?
How is your guests optical drive configured i.e as passthrough or virtual device?

Configured as a virtual device did you select the ISO file using the devices -> optical drive menu? That "inserts" the ISO file into the virtual disk drive. Once the ISO is "inserted" you can then mount it via

mount -t iso9660 /dev/dvd /mnt (or as desired...)
 
Old 07-13-2020, 08:54 AM   #6
zdolar
Member
 
Registered: Jul 2009
Location: Slovenija
Distribution: Slackware
Posts: 84

Original Poster
Rep: Reputation: 12
Quote:
Originally Posted by michaelk View Post
Did you copy the ISO file from the working guest to the host?
Configured as a virtual device did you select the ISO file using the devices -> optical drive menu? That "inserts" the ISO file into the virtual disk drive. Once the ISO is "inserted" you can then mount it via

mount -t iso9660 /dev/dvd /mnt (or as desired...)
Yes Configured as a virtual device did you select the ISO file using the devices -> optical drive menu.
And the problem is, no new entry is created in /dev/ There are only sda and sda1 disks, no other. And strange "Remove disk from virtual drive" is clickable, reflecting image is inserted. When I click on it, tick is removed in front of image and "remove disk .." become grey.

Looks like Slackware in single user mode do not insert image/CD and /dev/XYZ is not created.
 
Old 07-13-2020, 09:19 AM   #7
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 14,809

Rep: Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870
Just a guess: probably you need to boot first and insert the disk when the system is already running.
 
Old 07-14-2020, 07:16 AM   #8
zdolar
Member
 
Registered: Jul 2009
Location: Slovenija
Distribution: Slackware
Posts: 84

Original Poster
Rep: Reputation: 12
Quote:
Originally Posted by pan64 View Post
Just a guess: probably you need to boot first and insert the disk when the system is already running.
Thanks for hint, but this did not helped.
Whatever I do with ISO (insert/remove) prior or after booting, the /dev folder is always the same, no devices created. I do not have a device to mount.
You can see attached picture - booted single user Slackware storage in a VirtualBox Manager. SATA Port 1 VboxGuestAdditions.iso attached but no device created.
dmesg - last message regarding / mounted as rw, ISO insertion not traced.
/var/log/ - not a single file change after ISO insertion.

Thinking of my kernal compilation - minimalistic to boot without (for me stupid) initrd all other compiled as modules including loop. I exclude hardware I do not have, to speed up kernel & modules compile and to lower kernel/modules footprint on the disk. (over 20 years practice)
This might be the key.

If I boot normally (3 - multiuser) and logon as root, then device is created and can be mounted.

For those who prefer initrd:
I always have problems at fresh Slackware install. Booting do not work, as some devices are compiled as modules (USB, years ago EXT4..). So after install I have to boot from install media, and guess which modules to include into initrd. And this "guess" = some iterations, time consuming, finger breaking..
Attached Thumbnails
Click image for larger version

Name:	storage.png
Views:	4
Size:	6.7 KB
ID:	33656  
 
Old 07-14-2020, 07:40 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 14,809

Rep: Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870
but you can try to mount that vdi in another working VM or you can try to mount a regular directory from outside (as shared folder).
 
1 members found this post helpful.
Old 07-17-2020, 04:55 AM   #10
zdolar
Member
 
Registered: Jul 2009
Location: Slovenija
Distribution: Slackware
Posts: 84

Original Poster
Rep: Reputation: 12
Quote:
Originally Posted by pan64 View Post
but you can try to mount that vdi in another working VM or you can try to mount a regular directory from outside (as shared folder).
Yes, that was a solution - my post here 13th Jul 2020 15:11

I'll close as solved.
 
Old 07-17-2020, 05:18 AM   #11
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 14,809

Rep: Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870Reputation: 4870
Quote:
Originally Posted by zdolar View Post
Yes, that was a solution - my post here 13th Jul 2020 15:11

I'll close as solved.
you are welcome.
If you really want to say thanks just click on yes.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
No Single-User Mode or Diagnostic Startup Mode El Capitan MacPro 2012 pcarrington Linux - Newbie 2 02-12-2016 08:28 PM
Unable to Access to Single User Mode or Emergency Mode Pinglu Linux - Newbie 3 10-17-2011 01:25 PM
Emergency mode can mount the HDD with FS error but not in rescue or single user-mode kayod_jj Linux - Newbie 3 12-01-2010 07:03 PM
single user mode under vxfs mode enabled. UltraSoul Solaris / OpenSolaris 1 06-27-2009 09:48 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 - Distributions > Slackware

All times are GMT -5. The time now is 04:15 AM.

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