Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Adding a second hard drive (/dev/sdb) to Debian Stable
I partitioned the new drive using parted.
I have the following diagnostics:
Quote:
root@geeves:~# parted -l
Model: ATA Samsung SSD 840 (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 111GB 111GB primary ext4 boot
2 111GB 120GB 8550MB extended
5 111GB 120GB 8550MB logical linux-swap(v1)
Model: ATA WDC WD2005FBYZ-0 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 2000GB 2000GB primary
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0
has been opened read-only.
Error: /dev/sr0: unrecognised disk label
Model: ATAPI iHAS124 W (scsi)
Disk /dev/sr0: 498MB
Sector size (logical/physical): 2048B/2048B
Partition Table: unknown
Disk Flags:
root@geeves:~# blkid
/dev/sda1: UUID="baba1d66-1d46-4fc8-a6ea-50135e908f3f" TYPE="ext4" PARTUUID="59d061e6-01"
/dev/sda5: UUID="bdf2e381-a31b-46b2-9487-e86affe9a201" TYPE="swap" PARTUUID="59d061e6-05"
/dev/sdb1: PARTLABEL="primary" PARTUUID="b2846836-477f-4a04-bfef-5b0250d81771"
root@geeves:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=baba1d66-1d46-4fc8-a6ea-50135e908f3f / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=bdf2e381-a31b-46b2-9487-e86affe9a201 none swap sw
0 0
or for more flexibility, create a logical volume from part of the space and build the filesystem there. That lets you expand or move filesystems later as needed.
Any chance you have gparted available? Could your version of parted be old?
Does the motherboard fully support the size of disk you installed and does it show in bios correctly?
Both of those commands result in a corrupted file system.
The last one is wrong, you're formatting the whole disk again, not the partition, so overwriting all of the gpt info (which is in the beginning part of the disk, between block 1 and the start of the sdb1 partition itself).
Normally the first partition starts at about a MB (2048 blocks) from the beginning of the disk.
That gave me a page of error messages, which threw me off completely. However, it was successful.
It's great that your problem is solved. I strongly doubt these were error messages, though. If they were, you should not ignore them.
Quote:
One minor problem: The directory (dolphin) lists the new drive as "primary", the alternative being "logical?". This could be confusing.
I don't know if the concepts of primary and logical partitions make sense in the context of a GPT disk, but it is true that parted considers the partition primary, because you told it so:
I was working command line at the time, and the messages had something to do with buffer overflow. Not terribly surprising, since the disk is about eight years younger than the motherboard.
The gpt system apparently allows for being subdivided into a very large number of logical disks. Given that GPT can allow for something like 1000 petabytes, that is not too surprising.
One thing that I learned in passing is that portable storage devices should probably be formatted with ext3 instead of ext4 if you are going to be shuttling that drive from one machine to another. Ext4 wants to re-mount to the previous user.
Quote:
Originally Posted by berndbausch
It's great that your problem is solved. I strongly doubt these were error messages, though. If they were, you should not ignore them.
I don't know if the concepts of primary and logical partitions make sense in the context of a GPT disk, but it is true that parted considers the partition primary, because you told it so:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.