I have installed a 2nd SATA 500Gb hard drive in my existing Fedora 19 computer. How do I get the OS of recognize and use this new HD?
Thank You all for any help
Hi Emp53 - and welcome to the Forum.
Once the new HDD is attached, it should appear listed in your file manager.
I am not familiar with Fedora but if it works anything like Ubuntu, you can also check with the following command: df | grep "/dev/sd"
This should list drives sda1 and sdb1
By the way; is the new HDD external or internal?
Keith
It is internal installed on the SATA3 connector on the motherboard. Seagate New in box.
The results of that ls | grep command only show sda1. nothing else.
Under activities there is a "disks" utility that is a gui representation of whats in the system. This utility shows two 500Gb seagate hard drives, the first one listed as the master boot record and is the one that I assume I boot from and contains my Fedora OS. its device Id is /dev/sda1 and shows a mounting location
The second device Id is /dev/sdb this does not show a mounting location. If it is /dev/sdb then do I simply need to mount the device, if so, where should I mount it?
By the way the HD box does not say whether it is formatted.
1. First of all, please copy and paste the output from the
df command that you entered so that we can see what's happening.
2.
QuoteBy the way the HD box does not say whether it is formatted
I presume you mean the box it came in. But it will be formatted.
output from "fdisk -l"
[email protected] ~]# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000510f7
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 976773119 487873536 8e Linux LVM
Disk /dev/sdb: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/fedora_new--host--7-swap: 4177 MB, 4177526784 bytes,
8159232 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/fedora_new--host--7-root: 53.7 GB, 53687091200 bytes,
104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/fedora_new--host--7-home: 441.7 GB, 441714737152
bytes, 862724096 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
QuoteDisk /dev/sdb: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
This looks good.
Now please execute my suggestion:
df | grep "/dev/sd"
and post the output here. It's best to
copy the output and
paste it here, rather than just typing it.
[email protected] ~]# df | grep "/dev/sd"
/dev/sda1 487652 103222 354734 23% /boot
That's interesting: fdisk recognises the new disk but df doesn't.
I don't have any ideas at present, but will have a think. Perhaps another Member can help.
Does it need to be mounted?
It does indeed.
First of all, trymount | grep "/dev/sd"
to check if it's mounted somewhere unexpected.
It looks to me that dev/sdb is not partitioned:
QuoteDisk /dev/sdb: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Missing the partition data
The fdisk -l command doesn't list partitions, I think. It didn't list your sda partitions.
Please executemount | grep "/dev/sd"
and report the full result.
the
fdisk -l does list partitions:
QuoteDisk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000510f7
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 976773119 487873536 8e Linux LVM
but listed none of them for /dev/sdb
It does indeed with the "long" option.
Please trymount | grep "/dev/sd"
and post the whole output.
[
[email protected] home]# mount | grep "/dev/sd"
/dev/sda1 on /boot type ext4 (rw,relatime,seclabel,data=ordered)
Sezo - Sorry, I missed your name on your posts.
Neither fdisk -l nor df list sdb on Emp's computer so I can't see how to create partitions unless the drive can be seen. If you can advise him, please jump in and take over.
Keith
Assuming the new HD came formatted is it also safe to assume that it is NTFS ?
Probably, yes, but Linux will cope with that. One can use fdisk to specify a range of formats, all of which Linux can use.
Are there any BIOS settings that need to be changed so the HD is seen upon boot up?
No, I think not. One can select the boot order, and it might be interesting to boot into the BIOS to see if your new disk is listed as an optional HDD to boot from.
Nothing on any of the listings I've done shows that it has a boot sector?
Not familiar with fedora so please forgive my ignorance if this does not work as intended.
The problem appears to be that the HDD (/dev/sdb) appears to be un-partitioned.
Therefore there are no mountable partitions.
You could install parted:
sudo yum install parted -y
Then list the available
sudo fdisk -l
(make sure /dev/sdb is listed)
Then run parted:
sudo parted -a optimal /dev/sdb
Note you will stay in parted shell, shown as (parted)
print out the current HDD configuraion
(parted) print
This should give you the list of partitions (I assume will be none)
To create a standard dos partition table (use gpt if you prefer GPT):
(parted) mklabel msdos
(parted) print
Create one primary partition as ext4
(you still need to create the filesystem, see later)
(parted) mkpart primary ext4 0% 95%
(parted) print
A new partition should be listed
then exit
(parted) q
Now create the filesystem
sudo mkfs.ext4 /dev/sdb1
Note, you can create ntfs instead of ext4 if you like.
After that it will get automounted (probably)
Many thanks, Sezo.
Keith
Apparently "parted" is not in my repository. googled how to get it and install it, suggestions using dnf and git. Also not in my distro. I feel like a rat in a maze, with no cheese.
Surprised that parted is not in the repo for your distro, it is Fedora you are using?
According to this : https://docs.fedoraproject.org/en-US/Fedora/14/html/Storage_Administration_Guide/s1-disk-storage-parted.html (https://docs.fedoraproject.org/en-US/Fedora/14/html/Storage_Administration_Guide/s1-disk-storage-parted.html)
QuoteBy default, the parted package is included when installing Fedora.
Have you got Gparted installed?
Gparted was not part of my Fedora 19 installation either it is not in the repo.
My system has an app called "gdisk" when when entered at the cmd line returns "GPT fdisk (gdisk) version 0.8.18
I got it accomplished using fdisk. now I'm battling group permissions since the disk was initialized and mounted as root. Now how do I mark this thread as solved???
I'm pleased that you managed to solve this problem.
To mark your topic as solved just edit the title of your first post on this topic as [SOLVED].
Thank you.
Keith