LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-21-2007, 01:37 PM   #1
Josephus Ross
LQ Newbie
 
Registered: Mar 2007
Posts: 22

Rep: Reputation: 15
Ext2 issues


Hi there,

I'm trying to setup a new primary partition on my main disk but seem to be running into a few dificulties. I can run fdisk fine and end up with the following output from fdisk -l /dev/hda;

~# fdisk -l /dev/hda

Disk /dev/hda: 1039 MB, 1039417344 bytes
16 heads, 63 sectors/track, 2014 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 1016 512032+ 83 Linux
/dev/hda2 * 1017 2014 502488 83 Linux

However the problem comes when I try to run mkfs.ext2 where I get;

~# mkfs.ext2 /dev/hda2
mke2fs 1.40-WIP (14-Nov-2006)
mkfs.ext2: No such device or address while trying to determine filesystem size

Not sure why this is the case.

Any ideas?

Joe
 
Old 08-21-2007, 03:14 PM   #2
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Have you tried mke2fs /dev/hda2
http://linux.die.net/man/8/mke2fs
 
Old 08-21-2007, 03:24 PM   #3
Josephus Ross
LQ Newbie
 
Registered: Mar 2007
Posts: 22

Original Poster
Rep: Reputation: 15
Yes, unfortunately the same thing happens
 
Old 08-21-2007, 03:30 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Have you rebooted since creating the partition ?. What does "cat /proc/partitions" show ?.

There are ways of forcing the partition table to be re-read. The only one I know that always works is a re-boot.
 
Old 08-21-2007, 03:42 PM   #5
Josephus Ross
LQ Newbie
 
Registered: Mar 2007
Posts: 22

Original Poster
Rep: Reputation: 15
when I run cat /proc/partitions i get;

~# cat /proc/partitions
major minor #blocks name

3 0 1015056 hda
3 1 512032 hda1

Which obviously doesn't show the new partition. I'm a little worried about rebooting after editing the partitions in fdisk as I only have remote access. Do any edits made in fdisk format the partition? The only thing I have changed about hda1 is the boot element. Will this have formatted that partition or is it ok to set this back as the main boot partition?
 
Old 08-21-2007, 04:03 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
fdisk merely plays with partition definitions - not contents. It doesn't "format" anything.
But you may not be asking what you think you're asking.
I presume by "The only thing I have changed about hda1 is the boot element" you mean the boot flag (the aster in the list above) ???.
It gets ignored by Linux - do as you please.

To save a remote re-boot, try
Code:
hdparm -z /dev/hda
That may save you any angst.
 
Old 08-21-2007, 06:38 PM   #7
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Quote:
Disk /dev/hda: 1039 MB, 1039417344 bytes
Is that disk really only 1GB or is that an anomaly?
 
Old 08-21-2007, 07:33 PM   #8
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Based on those calculations, fdisk sees a kilo as 1000, not 1024.
EDIT: I have smaller drives than that, on the shelf that is.

Last edited by Junior Hacker; 08-21-2007 at 07:36 PM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync ext2/3 to FAT issues RodWC Linux - General 3 05-26-2007 05:02 PM
EXT2 -fs warning (device sda1): ext2_fill_super:mounting ext3 filesystem as ext2 snakeo2 Linux - Newbie 6 11-19-2006 07:35 PM
Does FreeBSD 5.3 have any issues with reading/writing to EXT2/3 partitions? Tsuroerusu *BSD 2 10-14-2005 06:55 PM
ext2 / ext3 slowly Linux - General 1 10-25-2004 07:31 PM
FAT to ext2 twinkiehunterg Linux - Software 2 10-21-2003 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:51 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
Open Source Consulting | Domain Registration