fsck'u sake!

Distributions that do not fit in the above categories (please limit discussion to freely available GNU/Linux/Hurd based distributions).
Post Reply
User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

fsck'u sake!

Post by Calum » Sat Feb 22, 2003 7:20 pm

hiya, i just put basiclinux 1.8 on /dev/hda5 and i already have mandrake 9 on /dev/hda3

when i boot into basiclinux i get a big error message telling me to do something about the invalid ext2 filesystem on /dev/hda5 and reboot immediately. oddly i can then login and it all seems to work okay. however if i do an fsck on /dev/hda5 i get told that there's a wrong magic number (?) HOWEVER when i boot into mandrake and do an fsck of that partition, i get NO errors at all. fdisk reports however that /dev/hda4 does not end on a partition boundary. this is the sort of thing i have seen come up with partitions that are made by diskdrake before, they work fine but some utils give you these cryptic error messages.

Now this fsck thing is made even more cryptic by the fact that i tried to do it properly and make the filesystem on /dev/hda5 in basiclinux (running in a ramdrive since i hadn't made the partition for it yet) and i seemed to be able to install the system there fine, but then when i look at /dev/hda5 (mounted) in mandrake, i see nothing, no contents at all. not only that but grub appears not to recognise the filesystem on (0,4) either!
then i mke2fs in mandrake to stop it getting the error but then i cannot run the script to install basiclinux on /dev/hda5 because it needs to be executed from within basiclinux. i reboot into the ramdrive version of basiclinux to do this and find that the (mandrake formatted) /dev/hda5 partition no longer contains a valid ext2 filesystem according to basiclinux. sigh.

so what i did was i made an ext2 (basiclinux filesystem on there, installed basiclinux on it, then made a tarball of the entire directory structure excluding /proc and shifted it off /dev/hda5 - i then rebooted into mandrake, made a new ext2 (mandrake) filesystem and untarred the entire basiclinux system into the new ext2 (mandrake) partition.

so now grub sees the partition, mandrake sees the partition and basiclinux boots, gives me a many exclamationmarked error message telling me to reboot, and then appears to see the partition fine too, elthough i have not attempted to read or write to the partition while in basiclinux yet.

Anyway, i'm sure you loved that little story of mine but there comes a time when one just has to get to the point and the point is this:

how do i fix the magic number and possibly fix the hda4 partition boundary error so i get no error messages or as few as possible and not destroy all the data?

maybe i could compile a new kernel in basiclinux......
do you need any libraries for that or do you just need the kernel sources as a tarball (the 25M one)?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Feb 22, 2003 7:26 pm

It almost sounds like you have a partition that is overlapping another. Could this be? What does an "fdisk -l /dev/hda" say? I would certainly delete the partitions and recreate with "fdisk", or maybe even "parted".

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Sun Feb 23, 2003 10:31 am

Code: Select all

[root@localhost calum]# fdisk -l /dev/hda

Disk /dev/hda: 255 heads, 63 sectors, 1868 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1       136   1092388+   6  FAT16
/dev/hda2           137       513   3028252+  a5  FreeBSD
/dev/hda3           514       837   2602530   83  Linux
/dev/hda4           838      1869   8284405+   5  Extended
Partition 4 does not end on cylinder boundary:
     phys=(1023, 91, 63) should be (1023, 254, 63)
/dev/hda5           838       912    602406   83  Linux
/dev/hda6           913      1265   2835441   83  Linux
/dev/hda7          1266      1828   4522266   83  Linux
/dev/hda8          1829      1869    324166+  82  Linux swap
so partition one is fat16/DOS, 2 is freeBSD, 3 is mandrake, 4 is an extended partition, 5 is basiclinux, 6 is debian (not yet installed) 7 is /home and 8 is swap. 5, 6 and 7 are inside 4.

also, i have not yet managed to successfully burn reliable backups using linux so i am reticent to delete everything and remake the partitions.

gak! i just realisedthat partition 8 is inside4 as well! maybe i can shorten 4 and stick the swap outside the thing there...

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sun Feb 23, 2003 10:47 am

The "cylinder boundary" thing "shouldn't" be a problem with Linux. However, if you plan on ever using Partition Magic or DOS/WIN FDISK on the thing then you will have problems. It might be best to correct the problem. I would drop the size of partition 4 and 8 down by 1 cylinder and see if that error message goes away. And there is nothing wrong with partition 8 being within the extended partition. You can only have 4 primary partitions.

User avatar
Calum
guru
guru
Posts: 1349
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Mon Feb 24, 2003 9:11 am

well i tried to take your advice and i ran the red hat installer to install red hat 8. i used the fdisk that is part of the red hat installer and i deleted all the partitions (yes all of them) and then wrote the nothing partition table to disk. i then reopened fdisk and created a new similar partition table to the one i had before, now with 9 partitions, where 5 to 9 are within number 3 or something like that) but then i went into disk druid to continue the installation and fsck me if there aren't a bunch of odd free space sections between all the partitions. they all show up as '>1M' but if i select them they seem to be 7M in size. now considering all the partitions start and end on consecutive partition boundaries, this is confusing to me. also confusing is that i have noticed that a diskdrake partition table sometimes shows up like this in disk druid, but i have never seen fdisk do this before.

i have decided to live with it. i don't plan on using any of that dos crap anyway.

i have one of those maxtor 15GB drives that everybody was tut tutting at and shaking their heads in the general direction of, is this likely to cause this cylinders/megabytes discrepancy?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Mon Feb 24, 2003 9:15 am

I'm not sure if that could be causing your issue or not. I have seen the cylinder boundry thing in the past but if I recall correctly I have always been able to resolve it, and I found it beneficial to resolve it for the reasons I mentioned (partition magic). Do the "parted" partition checks pass?

Post Reply