Linux.com

Author Message
Joined: Jun 19, 2008
Posts: 9
Other Topics
Posted Jun 19, 2008 at 4:51:18 PM
Subject: Setting up disks to auto-mount on startup?
Hello, I am completely new to Linux/Ubuntu, and I am now using Linux as my primary Operating System, and have plans of ditching my Vista(and/or never booting into it-again), and was wondering if I could setup a disk(s) of mine to automatically mount on the system startup. Would I have to create some kind of batch file type deal? If so, what command(s) would I have to use?
Back to top Profile Email Website
chart3399
Joined Jun 17, 2008
Posts: 73

Other Topics
Posted: Jun 19, 2008 9:13:17 PM
Subject: Setting up disks to auto-mount on startup?
You will do this one of two ways: 1) If you want it to mount when the machine boots and hold the mount open forever you can simply add the mount point to /etc/fstab 2) If you want it to mount only when you access the drive you will utilize this using autofs. Depending upon which version of Linux and what type of drive you are trying to mount you will do this in a few different ways.
Back to top Profile Email Website
Predator106
Joined Jun 19, 2008
Posts: 9

Other Topics
Posted: Jun 19, 2008 10:07:37 PM
Subject: Setting up disks to auto-mount on startup?
So for 1, what exactly would I add. I opened that file, do # signs mean comments? /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0 That's the structure of one drive....
Back to top Profile Email Website
chart3399
Joined Jun 17, 2008
Posts: 73

Other Topics
Posted: Jun 19, 2008 10:24:14 PM
Subject: Setting up disks to auto-mount on startup?
Yes, in most, if not all configuration files found under /etc # are comments. The one drive you just posted is the floppy drive on your machine. What type of drive are you trying to add? You can run the command % fdisk -l to display all the drives and partitions the linux machine can see. Typically you might see /dev/hda1 This would be the first ide drive (identified by the a) and the first partition on the drive (identified by the 1). If you run the fdisk -l command and identified the drive/partition I can help more. ..corey
Back to top Profile Email Website
Predator106
Joined Jun 19, 2008
Posts: 9

Other Topics
Posted: Jun 19, 2008 10:40:30 PM
Subject: Setting up disks to auto-mount on startup?
/dev/sdb Is the drive I want to mount.
Back to top Profile Email Website
chart3399
Joined Jun 17, 2008
Posts: 73

Other Topics
Posted: Jun 19, 2008 10:50:04 PM
Subject: Setting up disks to auto-mount on startup?
/dev/sdb means that it is the second scsi disk (identified by the b) but you need to have partitions on the drive to mount it. Have you partitioned and formatted this disk yet so you can use it?
Back to top Profile Email Website
Predator106
Joined Jun 19, 2008
Posts: 9

Other Topics
Posted: Jun 19, 2008 11:12:17 PM
Subject: Setting up disks to auto-mount on startup?
The disk that I'm talking about only has one partition (I think), it was formatted when I installed vista a while back, so it's still NTFS.
Back to top Profile Email Website
AR

Joined May 06, 2008
Posts: 22

Other Topics
Posted: Jun 25, 2008 7:35:40 PM
Subject: Setting up disks to auto-mount on startup?
The first partition on /dev/sdb is called /dev/sdb1. I suppose you will want to re-partition the disk to change the filesystem to ext3 then initialize the filesystem on it and then you can mount it. You can use fdisk or cfdisk /dev/sdb to edit partitions (change partition type to ext3) and when you're done (sometimes you need to reboot after changing the partition table..) mkfs.ext3 /dev/sdb1 (this will create a new ext3 filesystem on /dev/sdb1) Make sure you use the correct device names otherwise you can damage data elsewhere.
Back to top Profile Email Website
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya