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.
I was looking to a quick and easy how to for installing a new second hard drive. After searching your archives I didn't really find a really quick and easy how to.
Below is a quick and easy example, I figured that adding a drive must be a question that gets asked a lot so I thought I would share this.
As root perform the following: (as highlighted in bold)
[root]# fdisk /dev/hdb
Command (m for help): m (Enter the letter "m" to get list of commands)
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2654, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2654, default 2654):
Using default value 2654
Command (m for help): p
Disk /dev/hdb: 240 heads, 63 sectors, 2654 cylinders
Units = cylinders of 15120 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 2654 20064208+ 5 Extended
Command (m for help): w (Write and save partition table)
[root]# mkfs -t ext3 /dev/hdb1
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2508352 inodes, 5016052 blocks
250802 blocks (5.00%) reserved for the super user
First data block=0
154 block groups
32768 blocks per group, 32768 fragments per group
16288 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root]# mkdir /opt2
[root]# mount -t ext3 /dev/hdb1 /opt2
The digits "1 2" refer to whether the mount point should be backed up when the dump command is used and disk integrity checks using fsck. The "1" states that it should be backed up when the dump command is issued (0=no). The "2" refers to the order in which "fsck" should check the mount points. The digit "1" identifies the root ("/") of the filesystem. All others should be "2". (0=no check)
Couple notes to help people who may be new at this:
cfdisk is much more user friendly than fdisk
/dev/hdb may not be the location of the new drive you installed. Please don't blindly use that device. If you don't know the location of your new drive, get help before running fdisk or cfdisk.
More notes: There are other variations but, basically, a-b-c-d are primary master-primary slave-secondary master-secondary slave and IDEs are hd and SCSIs are sd. If you've got something else, you probably know it.
And cfdisk actually has strange cursor operations to me. fdisk is just as friendly - it just has a letter-based text menu instead of a button-based tui menu. But to each their own.
And there are other mkfs options if you want reiser and so on.
first ... i'm using RH9 i am adding a Mator 17G hard drive that previously had a billion partitions (thanks Win95) . i successfully removed all old partition, created one new partition and formated that partition. I am also able to mount the device on startup using /etc/fstab to a folder called /opt2,
My question is now (forgive me i'm a newbie) how do i know what is being saved to the added hard drive and what is being saved to the original?
Based on your description, if you save something to /opt2, it's written to the new one and, otherwise, it's written to the old. It depends on your partitions, mount points, and where you save stuff.
Hi, I have a problem mounting a hard disk. it my win xp hdd.
when i key in /etc/fstab, they give me permission denied and I M login s the root. i try chmod bt cant quiter fig it out..can any1 gve me the detail steps to do or key in the command line in my terminal? my win xp hdd is 20G wif 2 partition of 1st 10G 2nd 9G nmy Linux RH9 is on my 2nd hdd.
i can get to c fdisk n all my drives info bt i cant get to mount that winxp hdd. can any1 helpme?
Maybe this should go into a new thread, but these are my two cents...
First, I'm using Fecora Core 1. Installed on a Compaq Aramada 500 (a laptop) that has a PCMCIA FireWire controller connected to an external 80GB HD.
Fedora wasn't able to use the drive. I don't know why. I've searched a bit, and found that by issuing rescan-scsi-bus.sh (that I got from here
I can get linux to use it (after this command it appears in /proc/scsi/scsi, and can be mounted).
And finally, to My question :
How do I make that happen AUTOMATICALLY, at every boot?
And while we're at it ,
Is there a way to move most (if not all) of the harddrive to the new drive?
I'd like to leave /boot and maybe /etc on the old drive (it's a 4GB HD) and have the entire / (except these two) moved to the new HD.
Is that at all possible???
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.