LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-22-2003, 02:32 AM   #1
behd
LQ Newbie
 
Registered: Jul 2003
Posts: 2

Rep: Reputation: 0
Harddisk geometry & partition's table problem...


Hi everyone,

I'am in deep shit !!! I can't mount anymore the root partition of my server (/dev/hdb6). Primary partition (/boot on /dev/hdb1) is still available tough ?!?

My system architecture:
Motherboard MSI-6163Pro(v2) with latest AWARD BIOS (>2000)
1 primary disk 20 Gb Quantum (/dev/hda with WinOS & Drake)
1 secondary disk 80 Gb Maxtor (/dev/hdb dedicated to Gentoo)

output of lsparts:
Code:

hda1: 1,506 Mbytes, type <0x7> (NTFS (or HPFS))
hda2: 15 Mbytes, type <0x83> (Ext2)
hda5: 4,000 Mbytes, type <0xc> (Win98 FAT32, LBA-mapped)
hda6: 8,001 Mbytes, type <0xc> (Win98 FAT32, LBA-mapped)
hda7: 2,000 Mbytes, type <0x183> (ReiserFS)
hda8: 133 Mbytes, type <0x82> (Linux Swap)
hda9: 3,937 Mbytes, type <0x183> (ReiserFS)
-
hdb1: 95 Mbytes, type <0x183> (ReiserFS)
hdb5: 488 Mbytes, type <0x82> (Linux Swap)
hdb6: 71,861 Mbytes, type <0x183> (ReiserFS)


output of sfdisk -l:
Code:

Disk /dev/hda: 2498 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/hda1 * 0+ 191 192- 1542208+ 7 HPFS/NTFS
/dev/hda2 192 193 2 16065 83 Linux
/dev/hda3 194 2497 2304 18506880 f Win95 Ext'd (LBA)
/dev/hda4 0 - 0 0 0 Empty
/dev/hda5 194+ 703 510- 4096543+ b Win95 FAT32
/dev/hda6 704+ 1723 1020- 8193118+ b Win95 FAT32
/dev/hda7 1724+ 1978 255- 2048256 83 Linux
start: (c,h,s) expected (1023,254,63) found (1023,1,1)
/dev/hda8 1979+ 1995 17- 136521 82 Linux swap
start: (c,h,s) expected (1023,254,63) found (1023,1,1)
/dev/hda9 1996+ 2497 502- 4032283+ 83 Linux
start: (c,h,s) expected (1023,254,63) found (1023,1,1)

Disk /dev/hdb: 65531 cylinders, 16 heads, 63 sectors/track
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/hdb1 * 0+ 193 194- 97744+ 83 Linux
/dev/hdb2 194 158815 158622 79945488 5 Extended
/dev/hdb3 0 - 0 0 0 Empty
/dev/hdb4 0 - 0 0 0 Empty
/dev/hdb5 194+ 1185 992- 499936+ 82 Linux swap
/dev/hdb6 1186+ 147189 146004- 73585984+ 83 Linux


output of sfdisk -V:
Code:

llseek: invalid argument
cannot seek to 148367520
Warning: partition 2 extends past end of disk


disk geometry of /dev/hdb:
Code:

From vendor:
16383 Cyls / 16 Heads / 63 Sectors / 512 bytes/sector
Detected by the BIOS (provided as info, but nothing to do):
(LBA) 4111 Cyls / 255 Heads / 63 Sectors - 32Gb
Detected by sfdisk:
65531 Cyls / 16 Heads / 63 Sectors



Well according to sfdisk either my extended partition (/dev/hdb2) has suddenly grown or my root partition (/dev/hdb6) has been shrinked ?!?

Does someone know how I could fix the problem (or at least recover the datas) ??? Any help on this would be MUCH MUCH MUCH appreciated !!!


---
fdisk /dev/hdb -> unable to seek on /dev/hdb

if 'mount' works as sfdisk I presume that this problem should be recoverable (at least I hope) by fixing one of the partition table...
NB. Total #Cyls of extended part. (hdb2) > Total #Cyls of root part. (hdb6)

but which one should I fix & how ???

part of sfdisk code:
Code:

222 andersen 1.1 /*
223 * A. About seeking
224 */
225
226 /*
227 * sseek: seek to specified sector - return 0 on failure
228 *
229 * For >4GB disks lseek needs a > 32bit arg, and we have to use llseek.
230 * On the other hand, a 32 bit sector number is OK until 2TB.
231 * The routines _llseek and sseek below are the only ones that
232 * know about the loff_t type.
233 */
234 #ifndef __alpha__
235 static
236 erik 1.3 _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
237 loff_t *, res, uint, wh);
238 andersen 1.1 #endif
239
240 erik 1.3 static int sseek(char *dev, unsigned int fd, unsigned long s)
241 {
242 loff_t in, out;
243
244 in = ((loff_t) s << 9);
245 out = 1;
246 andersen 1.1
247 #ifndef __alpha__
248 erik 1.3 if (_llseek(fd, in >> 32, in & 0xffffffff, &out, SEEK_SET) != 0) {
249 andersen 1.1 #else
250 erik 1.3 if ((out = lseek(fd, in, SEEK_SET)) != in) {
251 andersen 1.1 #endif
252 erik 1.3 perror("llseek");
253 erik 1.4 errorMsg("seek error on %s - cannot seek to %lu\n", dev, s, FALSE);
254 erik 1.3 return 0;
255 }
256 andersen 1.1
257 erik 1.3 if (in != out) {
258 erik 1.4 errorMsg("seek error: wanted 0x%08x%08x, got 0x%08x%08x\n",
259 erik 1.3 (uint) (in >> 32), (uint) (in & 0xffffffff),
260 (uint) (out >> 32), (uint) (out & 0xffffffff));
261 return 0;
262 }
263 return 1;
264 andersen 1.1 }
...
1276 /* Do they start past zero and end before end-of-disk? */
1277 {
1278 unsigned long ds = get_disksize(F_SECTOR);
1279
1280 for (p = partitions; p < partitions + partno; p++)
1281 erik 1.3 if (p->size) {
1282 if (p->start == 0) {
1283 warn("Warning: partition %s starts at sector 0\n",
1284 PNO(p));
1285 return 0;
1286 }
1287 if (p->size && p->start + p->size > ds) {
1288 warn
1289 ("Warning: partition %s extends past end of disk\n",
1290 PNO(p));
1291 return 0;
1292 }
1293 }
1294 }
 
Old 07-23-2003, 07:21 AM   #2
behd
LQ Newbie
 
Registered: Jul 2003
Posts: 2

Original Poster
Rep: Reputation: 0
PROBLEM SOLVED !!!

seems it was a strange kernel issue (both 2.4.20 but one was recognising the correct geometry and the other not).

advertisment
if you ever have partition problem use gpart !!!
the program is really kewl & his author even more !!!
 
  


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
Debian Sarge netinst & businesscard, grub, changes drive geometry...Y? Outabux Debian 1 10-20-2004 10:57 PM
Fedora Core 2 HDD Geometry Partition Table problem. morrolan Fedora 1 10-01-2004 09:27 AM
Harddisk Geometry koyi Linux - Newbie 3 05-22-2004 06:08 AM
Geometry problem Zêr Linux - Hardware 1 03-26-2003 07:59 PM
Geometry problem Zêr Linux - Newbie 0 03-26-2003 05:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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