LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-16-2011, 10:11 PM   #31
JeffC1
Member
 
Registered: May 2008
Posts: 89

Original Poster
Rep: Reputation: 15

Now im up to the last stage on the guide:


[root@server~]# fsck -f /dev/sdb1
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
Pass 1: Checking inodes, blocks, and sizes

.... it seems to hang here... not sure whats going on.

Is this step necessary?

I cannot reboot the server
 
Old 02-16-2011, 10:27 PM   #32
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,930

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Running fsck is not necessary but rereading the partition table is.
partprobe /dev/sdb

Once the partition is reread I would then reformat (mkfs) the partition.
 
Old 02-16-2011, 10:43 PM   #33
JeffC1
Member
 
Registered: May 2008
Posts: 89

Original Poster
Rep: Reputation: 15
last step according to the document:

[root@server~]# fsck -f /dev/sdb1
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb1: 11/244203520 files (9.1% non-contiguous), 7680651/488377856 blocks
[root@server~]# fdisk -l

Completed.

In the end I still get

Disk /dev/sdb: 2000.3 GB, 2000396746752 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 243202 1953511424 7 HPFS/NTFS
 
Old 02-16-2011, 10:45 PM   #34
JeffC1
Member
 
Registered: May 2008
Posts: 89

Original Poster
Rep: Reputation: 15
I think it has to do with this error during the fdisk save...

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

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
 
Old 02-16-2011, 11:08 PM   #35
JeffC1
Member
 
Registered: May 2008
Posts: 89

Original Poster
Rep: Reputation: 15
Got clearance to reboot the server - on the way
 
Old 02-16-2011, 11:11 PM   #36
JeffC1
Member
 
Registered: May 2008
Posts: 89

Original Poster
Rep: Reputation: 15
Reboot - not luck the drive is still HPFS
 
Old 02-17-2011, 04:37 AM   #37
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,930

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Post the output of the command
file -s /dev/sdb1

The partition ID is independent of the actual format of the file system.
Make sure when using the fdisk utility you always specify the device and not the parititon ( i.e. fdisk /dev/sdb vs fdisk /dev/sdb1 )

What is the make / model of your drive?

Last edited by michaelk; 02-17-2011 at 05:48 AM.
 
Old 02-17-2011, 07:45 AM   #38
PenguinWearsFedora
Member
 
Registered: Jul 2009
Distribution: Slackware-14
Posts: 52

Rep: Reputation: 1
Quote:
Originally Posted by JeffC1 View Post
fdisk /dev/sdb1


Disk /dev/sdb1: 2000.3 GB, 2000388063744 bytes
255 heads, 63 sectors/track, 243199 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1p1 1 243199 1953495936 83 Linux


mount -l
Disk /dev/sdb: 2000.3 GB, 2000396746752 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 243200 1953503968+ 7 HPFS/NTFS



I'm getting conflicting results with a fdisk-l and fdisk
This seems bit strange. sdb1p1 seems like a partition within a partition? I think this is something that you are doing wrong. Either use fdisk's o option to create a new parition table or follow the fordeck's post#20 that suggests 3 simple steps:
1. dd if=/dev/zero of=/dev/sdb bs=512 count=1
2. Create partition using fdisk
3. format the newly created partition with mkfs.ext3

Last edited by PenguinWearsFedora; 02-17-2011 at 07:55 AM.
 
Old 02-17-2011, 10:00 AM   #39
JeffC1
Member
 
Registered: May 2008
Posts: 89

Original Poster
Rep: Reputation: 15
I get this when I type P and create a new primary partition

Device Boot Start End Blocks Id System
/dev/sdb1p1 1 243199 1953495936 83 Linux

I see. I should be using o?
 
Old 02-17-2011, 10:53 AM   #40
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Apologies if I seem to be butting in, but I wonder of this disk is a GUID partitioned disk?

It might be worth looking at it with gdisk (nothing to do with Gmail) instead of fdisk
 
Old 02-17-2011, 02:14 PM   #41
JeffC1
Member
 
Registered: May 2008
Posts: 89

Original Poster
Rep: Reputation: 15
I dont know if its a GUID partitioned disk. Its a brand new WD drive which we've used in the past.

I will try the guide once more and paste the entire results.
 
Old 02-17-2011, 02:17 PM   #42
JeffC1
Member
 
Registered: May 2008
Posts: 89

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by PenguinWearsFedora View Post
This seems bit strange. sdb1p1 seems like a partition within a partition? I think this is something that you are doing wrong. Either use fdisk's o option to create a new parition table or follow the fordeck's post#20 that suggests 3 simple steps:
1. dd if=/dev/zero of=/dev/sdb bs=512 count=1
2. Create partition using fdisk
3. format the newly created partition with mkfs.ext3

I did exactly as the guide said:

Quote:
Once you have deleted all existing partitions on the drive, you are ready to make a new one. Type "n" and hit "Enter." Then press "p" to create a primary partition. It asks you for a partition number; enter "1." Now you are asked which cylinder the partition should start at. The beginning of the drive is the default, so just hit "Enter." Then, you are asked for the last cylinder. The end of the drive is the default, so you can just press "Enter" again.

Read more: How to Format a Hard Drive in Linux | eHow.com http://www.ehow.com/how_1000631_hard...#ixzz1EFGvq7Y9
This created the /sdbp1 partition.
 
Old 02-17-2011, 02:18 PM   #43
JeffC1
Member
 
Registered: May 2008
Posts: 89

Original Poster
Rep: Reputation: 15
Following that guide - pressing p created the partition within the partition (dev/sdbp1). Should that exist? please let me know what i'm doing wrong. Full output below:

Code:
Disk /dev/sdb1: 2000.3 GB, 2000395698176 bytes
255 heads, 63 sectors/track, 243200 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

     Device Boot      Start         End      Blocks   Id  System

Command (m for help): o
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 243200.
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):
Command (m for help): m
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): d
No partition is defined yet!

Command (m for help): p

Disk /dev/sdb1: 2000.3 GB, 2000395698176 bytes
255 heads, 63 sectors/track, 243200 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

     Device Boot      Start         End      Blocks   Id  System

Command (m for help): p

Disk /dev/sdb1: 2000.3 GB, 2000395698176 bytes
255 heads, 63 sectors/track, 243200 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

     Device Boot      Start         End      Blocks   Id  System

Command (m for help): d
No partition is defined yet!

Command (m for help): ^X
[1]+  Stopped                 fdisk /dev/sdb1
[root@server~]# clear
[root@server~]# fdisk /dev/sdb1
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 243200.
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): m
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-243200, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-243200, default 243200):
Using default value 243200

Command (m for help): p

Disk /dev/sdb1: 2000.3 GB, 2000395698176 bytes
255 heads, 63 sectors/track, 243200 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

     Device Boot      Start         End      Blocks   Id  System
/dev/sdb1p1               1      243200  1953503968+  83  Linux

Last edited by JeffC1; 02-17-2011 at 02:20 PM.
 
Old 02-17-2011, 02:24 PM   #44
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
This is what I'd do:

Wipe it clean:

Code:
dd if=/dev/zero of=/dev/sdb
Partition it using fdisk or cfdisk (cfdisk has a much nicer interface, use it if you have it).

Code:
cfdisk /dev/sdb
Or if you don't have cfdisk:
Code:
fdisk /dev/sdb
And format the partition.
 
Old 02-17-2011, 02:30 PM   #45
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Judging from your #43 post you have run fdisk using a partition number 'sdb1'

Quote:
[root@sinuserver ~]# fdisk /dev/sdb1
Next time just use the device name 'sdb' after all it is the device you want to add a partition to. Your problem comes when you try to add a partition to a partition.

Regards,

Fordeck
 
  


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
NTFS Configuration Tool Can Not Detect SATA drive in NTFS format jlconferido Linux - Newbie 7 06-30-2007 08:07 PM
Hpfs/ntfs Bobymc Linux - Software 2 04-22-2006 11:58 PM
HPFS / NTFS problem C: partition appears to be empty thk33 Linux - Software 2 08-11-2004 11:22 AM
Lost XP HPFS/NTFS partition ajkhan Linux - General 3 09-19-2003 08:54 AM
how to moutn hpfs/ntfs farhan Linux - General 3 03-10-2003 09:08 PM


All times are GMT -5. The time now is 03:55 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