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.
Ok - I am formatting an extra drive I threw in my box and I must use FDISK so if anyone can please help me, I would greatly appreciate it!
As you can see the disk is now visible on the system.
Code:
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
I ran "fdisk /dev/sdb" command and created what I can only assume is an Ext3 partition since I saw only code "83". I also selected to make it a primary partition but I am not sure if that was the correct thing to do.
Code:
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 30401 244196001 83 Linux
My question now is so far have I done everything correct? If not, please explain what I did wrong and how to resolve it.
My 2nd question is now must I set a mount point to it? Do I just go to /etc/fstab and create a new entry to map /dev/sdb1 to /data?
Now that you have a partition, you need to make a filesystem on it. "fdisk" doesn't do that for you. You probably want to just run "mkfs.ext3 /dev/sdb1". After that, "mkdir /data". "chmod 777 /data" or whatever permissions you want. "mount /dev/sdb1 /data". And, it's mounted. For your fstab you can have this, at least that's what mine reads.
When you used fdisk to set primary and file system, did you select write to disk?
Since your linux system recognizes /dev/sdb ,yet "doesn't contain a valid partion table", perhaps you should use qparted or parted or a similar disk partioner to format this drive to your preferred file system (ext2, ext3, reisfers..)
hope this helped
When you used fdisk to set primary and file system, did you select write to disk?
Since your linux system recognizes /dev/sdb ,yet "doesn't contain a valid partion table"
I missed that. You will have to actually write the partition to the drive (the "w" command in fdisk) before you can put a filesystem on it, etc.
Quakeboy02, IMO your first post was correct, I believe the OPs first code block just indicated the drive was recognized, the second code block was after the drive was partitioned which now shows a valid partition table.
Carwill, the linux partition ID i.e. 83 does not indicated filesystem type. You can format it with any filesystem i.e. ext2/3, reiserfs, jfs, xfs etc.
Quakeboy02, IMO your first post was correct, I believe the OPs first code block just indicated the drive was recognized, the second code block was after the drive was partitioned which now shows a valid partition table.
Carwill, the linux partition ID i.e. 83 does not indicated filesystem type. You can format it with any filesystem i.e. ext2/3, reiserfs, jfs, xfs etc.
Ah - thanks - so now I just need to mk2fs -j to format as ext3, right? This is not done in the FDISK utility, right?
OK - thanks. I have it formated and partitioned now. However I was told that since these two mount points are removable USB drives, I should not have entries in /etc/fstab. Someone said I should remove the fstab entries & let hal/dbus/automounter run the show.
Anyone know what is the correct way to do this? I want to be able to just plug and play these two formated ext3 USB drives into any Linux system w/o massive headaches.
"Someone said I should remove the fstab entries & let hal/dbus/automounter run the show."
Give it a try. If you haven't mounted it after creating a filesystem, unplug it, wait a couple seconds, then plug it back in. If you have a mount point, then it worked.
NOTE: It's a good idea to give all the information you have about your stuff in the first post, rather than leaking it out in dribs and drabs. In this case, knowing it's USB is not a big deal. For the next one, it might be.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.