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 want to completely erase and reformat a hard disk.
I have 2 hard disks, 160gb (hda) and 60 gb (hdb) respectively.
The 160 is the boot disk.
I have removed all files from the 60 gb.
Here is info about disks:
SuSEBox:~ # fdisk -l
Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 131 1052226 82 Linux swap / Solaris
/dev/hda2 132 19456 155228062+ 83 Linux
Disk /dev/hdb: 60.0 GB, 60022480896 bytes
255 heads, 63 sectors/track, 7297 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 7134 57199432+ 83 Linux
/dev/hdb3 7135 7297 1309297+ 82 Linux swap / Solaris
Disk /dev/sda: 528 MB, 528482304 bytes
32 heads, 32 sectors/track, 1008 cylinders
Units = cylinders of 1024 * 512 = 524288 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1007 515568 6 FAT16
The hdb* is from the fact the this disk was previously a boot disk
(It was RedHat9, i don't know what the "Solaris" is doing in there)
but now i just want it for data, no booting.
What command(s) should I perform to reformat this disk?
and what should i put in /etc/fstab?
something like this? (calling it "bdrive")
/dev/hdb /mnt/bdrive ext3 auto 1 1
Distribution: Gentoo, Kubuntu, formerly LFS, SuSE, and RedHat
Posts: 133
Rep:
mkfs is the command used to format disks
e.g.
mkfs -t ext3 /dev/hdb1
If you want to make the single drive a whole partition, you need to change the partitioning using fdisk or cfdisk (cfdisk is probably easier), then format each partition you create.
BTW, the "Solaris" is the linux swap partition, it can be deleted using fdisk/cfdisk
Here is the RedHat 7.3 guide to using fdisk and mkfs. http://www.redhat.com/docs/manuals/l...t3-create.html
Google will reveal even more helpful info, but be sure to post back to tell us whether it worked or not.
and yes, that's almost exactly what you'd put in /etc/fstab, except that you have to have the partition number, you can't mount a whole drive
e.g.
/dev/hdb3 /mnt/bdrive/ ext3 auto 1 1
SuSEBox:~ # umount /mnt/bdrive
umount: /mnt/bdrive: device is busy
umount: /mnt/bdrive: device is busy
SuSEBox:~ # fuser -u /mnt/bdrive
/mnt/bdrive: 5895(root)
SuSEBox:~ # fuser -k /mnt/bdrive
/mnt/bdrive: 5895
No automatic removal. Please use umount /mnt/bdrive
SuSEBox:~ # umount /mnt/bdrive
SuSEBox:~ # mkfs -t ext3 /dev/hdb1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
26104 inodes, 104388 blocks
5219 blocks (5.00%) reserved for the super user
First data block=1
13 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729
This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
SuSEBox:~ # cfdisk /dev/hdb
(This gives a menu in which i deleted partitions on /dev/hdb, then added one partition for the whole disk)
Then I had to change permissions so that users other than root could write to it.
i am having a problem with the new partition .
I'm getting a disk full when copying files.
It will always copy the folders, but it won't copy files.
I'm using KDE Konqueror as a file manager.
I drag a folder to the new partition and it copies the folders (and folders within it) and then a dlg box pops up saying the disk is full.
If i then drag another folder, it copies the folders (and folders within it) and then a dlg box pops up saying the disk is full.
The partition looks good:
SuSEBox:~ # fdisk -l /dev/hdb
Disk /dev/hdb: 60.0 GB, 60022480896 bytes
16 heads, 63 sectors/track, 116301 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 116301 58615672+ 83 Linu
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.