LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-02-2003, 06:53 PM   #1
Saleen
LQ Newbie
 
Registered: Dec 2003
Posts: 4

Rep: Reputation: 0
Formating a Seconday hard Drive In Command Mode


Trying to Format a Old Unmounted hard Drive that was a linux disk @ one time i wish to make it all 1 file system jfs and mount it as www

its hdc any ideas on how to make this happen
 
Old 12-02-2003, 07:56 PM   #2
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
Hi.

If you just want to format the drive, without recreating your partitions on your hard drive, and you want to format as jfs .....

mkfs.jfs /dev/hdc

If you want to create or delete partitions before doing this.... fdisk /dev/hdc

You'll need to be logged in as root to do any of this.

Good luck

Craig
 
Old 12-02-2003, 07:56 PM   #3
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Ok, assuming that the drive is the second drive ( hdb ) and that you are going to use the entire drive for the partition you make, proceed as follows....

type: fdisk /dev/hdb

Command (m for help):n as in new partition

Command action... Select p primary (1-4)

Partition number (1-4):1

First Cylinder (some numbers): press enter

Last Cylinder or size : press enter here also because you are going to use the entire drive. If you want, you could set the size with something like +3000m which makes the partition size of 3 Gigs.

Command (m for help): t as in type of partition

Partition number (1-4): 1

Hex code (type L to list codes): 83 as in linux ext3

Command (m for help): w to write the new information

Now to format the partition, type: mkfs.ext3 /dev/hdb1

You can verify things with the command:fdisk -l

To mount that partition as www in linux...

Type: mkdir /mnt/www

Type: mount /dev/hdb1 /mnt/www
 
Old 12-03-2003, 08:51 AM   #4
Saleen
LQ Newbie
 
Registered: Dec 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Ok the disk on HDC is aliitle over 114GB how would i get it to use the full disk his is a copy of the commands you's gave me to use and what they did mabey yous can correct me or give greater advice


[root@systes root]# mkfs.jfs /dev/hdc
mkfs.jfs version 1.0.24, 18-Oct-2002
Warning! All data on device /dev/hdc will be lost!

Continue? (Y/N) y
\

Format completed successfully.

117187500 kilobytes total disk space.
[root@systes root]# fdisk /dev/hdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 232514.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-232514, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-232514, default 232514): +114500KB

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): l

0 Empty 1c Hidden Win95 FA 70 DiskSecure Mult bb Boot Wizard hid
1 FAT12 1e Hidden Win95 FA 75 PC/IX be Solaris boot
2 XENIX root 24 NEC DOS 80 Old Minix c1 DRDOS/sec (FAT-
3 XENIX usr 39 Plan 9 81 Minix / old Lin c4 DRDOS/sec (FAT-
4 FAT16 <32M 3c PartitionMagic 82 Linux swap c6 DRDOS/sec (FAT-
5 Extended 40 Venix 80286 83 Linux c7 Syrinx
6 FAT16 41 PPC PReP Boot 84 OS/2 hidden C: da Non-FS data
7 HPFS/NTFS 42 SFS 85 Linux extended db CP/M / CTOS / .
8 AIX 4d QNX4.x 86 NTFS volume set de Dell Utility
9 AIX bootable 4e QNX4.x 2nd part 87 NTFS volume set df BootIt
a OS/2 Boot Manag 4f QNX4.x 3rd part 8e Linux LVM e1 DOS access
b Win95 FAT32 50 OnTrack DM 93 Amoeba e3 DOS R/O
c Win95 FAT32 (LB 51 OnTrack DM6 Aux 94 Amoeba BBT e4 SpeedStor
e Win95 FAT16 (LB 52 CP/M 9f BSD/OS eb BeOS fs
f Win95 Ext'd (LB 53 OnTrack DM6 Aux a0 IBM Thinkpad hi ee EFI GPT
10 OPUS 54 OnTrackDM6 a5 FreeBSD ef EFI (FAT-12/16/
11 Hidden FAT12 55 EZ-Drive a6 OpenBSD f0 Linux/PA-RISC b
12 Compaq diagnost 56 Golden Bow a7 NeXTSTEP f1 SpeedStor
14 Hidden FAT16 <3 5c Priam Edisk a8 Darwin UFS f4 SpeedStor
16 Hidden FAT16 61 SpeedStor a9 NetBSD f2 DOS secondary
17 Hidden HPFS/NTF 63 GNU HURD or Sys ab Darwin boot fd Linux raid auto
18 AST SmartSleep 64 Novell Netware b7 BSDI fs fe LANstep
1b Hidden Win95 FA 65 Novell Netware b8 BSDI swap ff BBT
Hex code (type L to list codes): 83

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@systes root]# mkfs.jfs /dev/hdc1
mkfs.jfs version 1.0.24, 18-Oct-2002
Warning! All data on device /dev/hdc1 will be lost!

Continue? (Y/N) y
|

Format completed successfully.

577552 kilobytes total disk space.
 
Old 12-03-2003, 05:27 PM   #5
Saleen
LQ Newbie
 
Registered: Dec 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Never mind i realized my mistake
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
formating hard drive icanspellnew Linux - General 9 11-13-2004 03:56 PM
Formating hard drive? jnassiri Linux - Newbie 5 08-04-2004 12:11 AM
formating / partitioning a new hard drive true_atlantis Linux - Hardware 15 12-07-2003 06:09 PM
Formating Hard Drive Zakane Linux - Newbie 20 08-25-2003 12:13 PM
Formating 2 hard drive Tenchi147 Linux - Hardware 1 05-31-2003 05:01 PM


All times are GMT -5. The time now is 05:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration