You are not logged in.
I have two hard drives attached to an Arch computer. One is a IDE PATA drive which has Arch Linux on it. One is a SATA drive which has Windows XP on it. If I do nothing, Arch boots up. If during boot I hit F11 and temporaily change the boot order, Windows boots up.
Here's my problem. When I boot Arch, udev (at least I think it's udev) recognizes and mounts the SATA partitions which are NTFS. I don't want them mounted, so the first thing I do after a boot is unmount the three SATA (Windows) partitions.
So I did some research on how to prevent the SATA drive from being mounted at boot up. First I looked in /etc/fstab. The SATA drive (SDA1, SDA2, and SDA3) weren't in the fstab.
Next, I read the readme-udev-arch.txt file located in /etc/udev. It said that if I blacklisted modules in the /etc/rc.conf file, the modules would never be loaded. So I blacklisted the sata_nv module and blacklisted the ntfs module. I figured without these modules, the SATA hard drive wouldn't be recognized. After a reboot, I did a lsmod, and the sata_nv and ntfs modules were still listed. I don't know why unless the sata_nv and ntfs modules are integrated into the kernel itself and thus the blacklist has no effect on them.
I did a udevinfo --export and the SATA partitions were listed in the output. I really didn't want to play around with udev rules on a hard drive when i don't know what I'm doing. I'm not really interested in reloading Windows right now.
So, does anyone know how to prevent the SATA hard drive from being mounted at boot time?
Pudge
Offline
Are you using any autodetection in /etc/mkinitcpio.conf ?
Maybe they are loaded and mounted during boot time not from /etc/rc.conf and /etc/fstab?
Offline
Udev does NOT mount any partitions on its own. Check your fstab and any automounters that may be installed.
Offline
Udev does NOT mount any partitions on its own. Check your fstab and any automounters that may be installed.
Thanks Brain0 for the udev clarification. I have already checked /etc/fstab and didn't see anything there.
I am drawing a blank on the automounters.
Pudge
Offline
I don't want the SATA hard drive mounted at Arch boot up. Since the SATA hard drive is the only SATA device I have, I came up with this work around for now.
After backing up mkinitcpio.conf I edited the following line:
HOOKS="base udev autodetect ide scsi sata filesystems
and removed the sata entry. I ran
mkinitcpio -g IMAGE
and made an image. After backing up /boot/kernel26.img
I copied my new image to kernel26.img
This disables the SATA and the SATA hard drive is not detected.
Booted up, and the SATA hard drive was not mounted.
This is not totally how I wanted to do this, because if I ever add another SATA device such as a SATA CD/DVD drive, disabling the SATA sub system won't work.
I'm still open to any ideas on how to not mount the SATA hard drive without totally disabling SATA.
Pudge
Offline
The SATA drive is still detected after init has been started and the system boots. I really don't know why it was mounted though. Just curious: Where was it mounted before?
Offline
@brain0
the three SATA NTFS partitions were mounted at
/media/Win XP
/media/Apps
/media/MP3
as the partitions were named Win XP, Apps, and MP3 in Windows XP.
I have found a solution, and I made this out to be much harder than necessary for some reason. Mainly because I didn't totally understand how udev and initcpio worked.
I put everything back to the way it originally was.
Originally, /etc/fstab had no entries at all for /dev/sda1 /dev/sda2 or /dev/sda3. So after looking at the output of udevinfo --query and reading the man pages for fstab and nfs, I added the following lines to /etc/fstab
/dev/sda1 /media/Win nfs noauto 0 0
/dev/sda6 /media/MP3 nfs noauto 0 0
/dev/sda5 /media/Apps nfs noauto 0 0
bear in mind that the forums software eliminates excess spaces.
The noauto option prevented the SATA partitions from being mounted. I haven't figured out why they were mounted with no fstab entries. Since there were no fstab entries for the partitions and the partions were being mounted anyway, I cncluded something must be over riding fstab. I jumped to the conclusion it had to be udev or initcpio. Oh well, it now works exactly the way I want and I learned from the experience.
Pudge
EDIT: If I click on the "Computer" icon on the desktop, Nautilus still shows the three SATA partitions. If I click on one of the partitions, I get a dialog saying
Unble to mount the selected volume
mount: only root can mount /dev/sda6 on /media/Mp3
So the partitions are still being detected, but my fstab entries are preventing them from being mounted. Which is OK
Offline