Results 1 to 10 of 11
Hi,
I'm having problems with installing a SATA HDD on ubuntu. At the moment I've got two IDE HDDs one running SUSE 10.1 and the other running ubuntu hardy...I recently ...
- 04-07-2009 #1Just Joined!
- Join Date
- Feb 2009
- Posts
- 6
[SOLVED] Installing SATA drive on ubuntu
Hi,
I'm having problems with installing a SATA HDD on ubuntu. At the moment I've got two IDE HDDs one running SUSE 10.1 and the other running ubuntu hardy...I recently purchased a SATA hDD which i was initially using as an external backup drive. Now i have decided to put it in my machine as an added hard disk.
For some reason, it just doesn't mount. (i assume it should do this automatically in hardy) and when i do a
df -h
it does not seem to detect the SATA drive either? What could be wrong? can anyone assist me?
- 04-07-2009 #2
Have you set the hard drive to run as a slave and does it show up in the BIOS?
If it does what is the output of:
Code:ls /dev/disk/by-id/
Linux User #453176
- 04-07-2009 #3Just Joined!
- Join Date
- Feb 2009
- Posts
- 6
Hi Kieren,
Yes the disk drive does show up on BIOS.
Here is the output of
ls /dev/disk/by
//========================
melon@melon-Box:~$ ls /dev/disk/by-id/
ata-SAMSUNG_SP2504C_S09QJ1GL923012
ata-WDC_WD400JB-00JJC0_WD-WCAMA4063263
ata-WDC_WD400JB-00JJC0_WD-WCAMA4063263-part1
ata-WDC_WD400JB-00JJC0_WD-WCAMA4063263-part2
ata-WDC_WD400JB-00JJC0_WD-WCAMA4063263-part5
ata-WDC_WD400JB-00JJC0_WD-WCAMA4063263-part6
ata-WDC_WD400JB-00JJC0_WD-WCAMA4063263-part7
ata-WDC_WD400JB-00JJC0_WD-WCAMA4102862
ata-WDC_WD400JB-00JJC0_WD-WCAMA4102862-part1
ata-WDC_WD400JB-00JJC0_WD-WCAMA4102862-part2
ata-WDC_WD400JB-00JJC0_WD-WCAMA4102862-part5
ata-WDC_WD400JB-00JJC0_WD-WCAMA4102862-part6
ata-WDC_WD400JB-00JJC0_WD-WCAMA4102862-part7
ata-WDC_WD400JB-00JJC0_WD-WCAMA4102862-part8
ata-WDC_WD400JB-00JJC0_WD-WCAMA4102862-part9
scsi-1ATA_SAMSUNG_SP2504C_S09QJ1GL923012
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4063263
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4063263-part1
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4063263-part2
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4063263-part5
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4063263-part6
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4063263-part7
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4102862
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4102862-part1
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4102862-part2
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4102862-part5
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4102862-part6
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4102862-part7
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4102862-part8
scsi-1ATA_WDC_WD400JB-00JJC0_WD-WCAMA4102862-part9
//========================
- 04-07-2009 #4Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
In order to fashion the correct statements in the fstab, we would actually need the outputs of:
ls -l /dev/disk/by-uuid
ls -l /dev/disk/by-id
cat /etc/fstab
This way we can piece togther what simlinks go to what device, what's already been defined, and what yet we still have to do.
- 04-07-2009 #5Just Joined!
- Join Date
- Feb 2009
- Posts
- 6
Hi D-cat,
See outputs attached.
(slightly edited for clarity)
- 04-08-2009 #6Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
Huh, I expected a lot more output from the .../by-uuid line.
I forgot one, fdisk -l (that's FDISK -L in lower case).
and now I also want to see just mount by itself, since the fstab is more bare than I expected. Sorry, I just want to have as much information as possible to sort this all out. You might need to tell me which drive is the new one (like make and model) so I can do this sort of the way you want it. I can now see how you got so confused.
- 04-08-2009 #7Just Joined!
- Join Date
- Feb 2009
- Posts
- 6
fdisk -l seems to do nothing
//============
melon@melon-Box:~$fdisk -l
melon@melon-Box:~$
//===================
melon@melon-Box:~$ mount
/dev/sda8 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.24-23-generic/volatile type tmpfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/melon/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=melon)
//==========================
- 04-08-2009 #8
You must have root privileges to execute fdisk -l command.
Execute this
Post output here.Code:sudo fdisk -l df -h
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 04-08-2009 #9Just Joined!
- Join Date
- Feb 2009
- Posts
- 6
Thanks devils casper.
See attachment.
I think its the Disk /dev/sdc 250Gig cos the SATA disk is the only 250gig disk on the machine.
- 04-08-2009 #10Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
Okay, now things are a little clearer. Your computer claims there is no partition table. This sometimes happens when you change controllers (in this case, from an external case to inside); the controllers are reading/making up different logical geometries, so a table valid for one isn't for the other. The drive will have to be reformatted before you can use it inside your computer. My question to you first is... do you have anything on that drive that is not backed up and you want to keep?
If so, take that drive right back out, put it in its old case, plug it in, and back everything up you want to keep.
Otherwise, if you're ready, we can proceed with the format.
First we'll re-establish the partition table:
sudo fdisk /dev/sdc
o // Redundant, make sure the partition table is clear.
n // Make a new partition
p // Primary partition
1 // Entry 1
(Enter) // Start at the beginning
(Enter) // End at the end
w // Write the partition table and exit.
A new partition is automatically created of Linux type (ext2/3). Now to format it.
sudo mkfs.ext3 /dev/sdc1
is enough. You can look at other options (like labels) if you like, man mkfs.ext3 Now the drive should be ready to mount and use. I'd reboot here just for the sake of predictability. If the drive doesn't automount (and it probably will not), we'll have to define a fstab entry. Since you're mixing IDE and SATA, (with RAID to boot) I'd prefer to do it by uuid, but as it sits I think we can get away with the standard method, though it might cause problems if you add another internal drive in the future. The standard way would be something like first creating a mount point, I'm going to say /mnt/newdata for the purpose of this example.
cd /mnt
sudo mkdir newdata
Then we edit the fstab
gksu gedit /etc/fstab
add the following to the bottom of the file:
/dev/sdc1 /mnt/newdata ext3 relatime 0 2
The file has to end with a blank line (just make sure you press Enter at the end). Save and exit. Reboot. When your system comes back up, your drive should be automatically mounted.


