Need to prevent automount of additional drives

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Need to prevent automount of additional drives

Postby kwatson512 on Thu May 29, 2008 3:56 pm

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?

:?:
Mint 16 64-bit Cinnamon, Lenovo ThinkPad T430s, 8GB RAM
kwatson512
Level 4
Level 4
 
Posts: 203
Joined: Sun Apr 20, 2008 7:16 pm

Linux Mint is funded by ads and donations.
 

Re: Need to prevent automount of additional drives

Postby MagnusB on Thu May 29, 2008 5:25 pm

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
MagnusB
Level 6
Level 6
 
Posts: 1255
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: Need to prevent automount of additional drives

Postby kwatson512 on Thu May 29, 2008 9:39 pm

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).
Mint 16 64-bit Cinnamon, Lenovo ThinkPad T430s, 8GB RAM
kwatson512
Level 4
Level 4
 
Posts: 203
Joined: Sun Apr 20, 2008 7:16 pm

Re: Need to prevent automount of additional drives

Postby MagnusB on Fri May 30, 2008 4:16 am

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
MagnusB
Level 6
Level 6
 
Posts: 1255
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: Need to prevent automount of additional drives

Postby kwatson512 on Mon Jun 02, 2008 1:38 pm

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).
Mint 16 64-bit Cinnamon, Lenovo ThinkPad T430s, 8GB RAM
kwatson512
Level 4
Level 4
 
Posts: 203
Joined: Sun Apr 20, 2008 7:16 pm

Re: Need to prevent automount of additional drives

Postby Fred on Mon Jun 02, 2008 2:14 pm

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
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Need to prevent automount of additional drives

Postby MagnusB on Mon Jun 02, 2008 5:00 pm

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
MagnusB
Level 6
Level 6
 
Posts: 1255
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: Google Adsense [Bot], JohnBobSmith and 11 guests