Need to prevent automount of additional drives

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
kwatson512

Need to prevent automount of additional drives

Post by kwatson512 »

Hi,

I successfully installed Mint 4.0 on a 16GB USB flash drive (by removing my hard drive first and installing from the Live CD). My problem is that it won't boot with the hard drive installed in my laptop. I believe that is because the HDD is a Windows partition with full-disk PGP encryption. When I boot from USB, I get the Mint boot menu, but it hangs. Booting to the Mint recovery, it hangs just after recognizing the HDD (which it calls a SCSI drive). It won't mount because the drive is encrypted at the kernel level.

How do I change the boot sequence so that Mint does NOT automount drives it recognizes?

:?:
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
MagnusB
Level 6
Level 6
Posts: 1252
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: Need to prevent automount of additional drives

Post by MagnusB »

You have to edit /etc/fstab, remove defaults, and add the options. There is a Howto fstab at the ubuntu forums, take a look at that.
Image
You're not drunk if you can lie on the floor without holding on.
--Dean Martin
kwatson512

Re: Need to prevent automount of additional drives

Post by kwatson512 »

Thanks for the tip, but I couldn't find a solution there. I'm still pretty much a CL newbie, so some of that was confusing. I get that I might have to edit the /etc/fstab file, but I don't know where. The only possible line is the one pertaining to /proc. I read some about /proc and it led me to look into /etc/init.d and I'm reluctant to go messing around with code when I don't know what I'm doing.

Here's my etc/fstab file. (I added the noatime to minimize writes to the flash drive.)

Code: Select all

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda1
UUID=67cf9880-0e7b-4b19-a201-903505b03008 /               ext2    defaults,noatime,errors=remount-ro 0       1
# /dev/sda6
UUID=2d2e989a-acef-41d2-a596-fdc26a4d7b6f /home           ext2    defaults,noatime        0       2
# /dev/sda5
UUID=a1ba9f9b-2eea-4386-8186-d73a15892c16 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec 0       0
I'd like to add a "noauto" option to my hard drive, but I'm not sure what Mint calls it when it's booting from the USB drive (sda).
MagnusB
Level 6
Level 6
Posts: 1252
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: Need to prevent automount of additional drives

Post by MagnusB »

What you have to do is to find out what those disks are called in linux, then add them to your fstab. Boot up using a live CD or the USB dongle and post the output of

Code: Select all

sudo fdisk -l
And I or someone else will take a look at it :)
You did not have any ntfs partitions in your fstab, so those are handled automatically when you boot up.
Image
You're not drunk if you can lie on the floor without holding on.
--Dean Martin
kwatson512

Re: Need to prevent automount of additional drives

Post by kwatson512 »

Magnus,

Well, I can't boot from the USB dongle with the hard drive installed. I tried booting from USB with the hard drive removed, and then slipping it back in place while Mint was running. That resulted in a black screen with no remedy.

Here's the result of fdisk -l booting from the live CD (with the USB/Mint plugged in).

Code: Select all

Disk /dev/sda: 60.0 GB, 60011642880 bytes
240 heads, 63 sectors/track, 7752 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0x15244b99

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        7752    58605088+   7  HPFS/NTFS

Disk /dev/sdb: 16.2 GB, 16240345088 bytes
255 heads, 63 sectors/track, 1974 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1019     8185086   83  Linux
/dev/sdb2            1020        1974     7671037+   5  Extended
/dev/sdb5            1020        1260     1935801   82  Linux swap / Solaris
/dev/sdb6            1261        1974     5735173+  83  Linux
Of course, when I boot from USB, it identifies itself as /dev/sdax (not sdb as in this case). I have no way of knowing how it identifies the hard drive (possibly /dev/sdb).
Fred

Re: Need to prevent automount of additional drives

Post by Fred »

kwatson512,

Download and burn, s-l-o-w-l-y, Gparted live cd iso.

http://download.linux-live-cd.org/Super ... sgd/cdrom/

Install both drives and boot the Gparted live cd. You should be able to see all your partitions with the correct designators.

That's the information MagnusB needs to help you.:-)

Fred
MagnusB
Level 6
Level 6
Posts: 1252
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: Need to prevent automount of additional drives

Post by MagnusB »

I think this would do it:

Code: Select all

/dev/sxxx /media/somefolder ntfs-3g  rw,suid,dev,exec,noauto, nouser,async 0 0
I just realized that the disk naming will be different when the USB device is the root HDD, you need to find your ntfs disks name when running from USB. Note that I added defaults, and changed auto to noauto.
Image
You're not drunk if you can lie on the floor without holding on.
--Dean Martin
Locked

Return to “Installation & Boot”