Re: How do I mount the USB stick containing the installer in Rescue Mode?
On Thu 15 Jul 2021 at 20:52:34 (+0200), Stella Ashburne wrote:
> > Sent: Thursday, July 15, 2021 at 4:05 PM
> > From: "David Wright" <deblis@lionunicorn.co.uk>
> >
> > Presumably given as root.
> >
> A definite yes because I chose to mount /dev/perfect-vg/root as a root file system in Rescue Mode.
>
> > > The error message is:
> > >
> > > mount: /media/myusb: /dev/sdb1 already mounted or mount point busy
> >
> > Type:
> > $ ls -l /dev/disk/by-label/
> > to see what the kernel called your stick. Debian installers have LABELs.
>
> root@perfect:/# ls -l /dev/disk/by-label/
> Total 0
> lrwxrwxrwx 1 root root 10 Jul 15 17:00 'Debian\x20testing\x20amd64\x201' --> ../../sdb1
> root@perfect:/#
>
> >
> > > Below are the results of cat /etc/fstab
> > >
> > > <file system> <mount point> <type> <options> <dump> <pass>
> > > /dev/mapper/perfect--vg-root / ext4 errors-remount-ro 0 1
> > > /boot/efi was on /dev/sda1 during installation
> >
> > There's a # before that line
> >
> Which line please?
The last line quoted, ie the line should read
# /boot/efi was on /dev/sda1 during installation
> > > UUID=A30E-2C33 /boot/efi vfat umask=0077 0 1
> > > /dev/mapper/perfect--vg-swap none swap sw 0 0
> > > /dev/sr0 /media/cdrom0 udf, iso9660 user, noauto 0 0
> > > /media/myusb
> >
> > That line looks spurious. If you put it there, I would remove it for
> > the time being.
> >
> Did you mean /media/myusb ?
Yes, an entry in fstab needs at least four fields:
Device Mountpoint FStype Options
I presume you type /etc/fstab into your post, both because of the
missing # for the comment, and because the /dev/sr0 line has too
many fields. It should contain udf,iso9660 user,noauto
without spaces after the commas.
> > When you mount a USB stick as root, you don't need
> > an entry in fstab, but you do need to create a mount point first.
>
> I didn't know that I didn't need to create an entry in fstab if I mount a USB stick as root.
>
> > Of course, this has been done for you as a convenience: there is
> > a /mnt directory specifically for temporarily mounting a device.
> >
> root@perfect:/# mount /dev/sdb1 /mnt
> mount: /mnt: /dev/sdb1 already mounted or mount point busy
> root@perfect:/#
The principal function of fstab is to describe filesystems that need
mounting by the OS for it to carry out its normal functions.
A second function is to hold information so that filesystems can be
mounted merely by mentioning only the device or the mountpoint.
A third is to make it possible for users to do the same, but without
require root privilege.
But if you're prepared to type the whole mount command, root can mount
"any" device on "any" mountpoint (when sensible). And that's obviously
more flexible when you're trying things out. You don't want to have to
keep going back to fstab to tweak it all the time.
Cheers,
David.
Reply to: