Partitioning problem

I wish to resize my partitions since upgrading to OpenSUSE 11.0 my / partition is full.

I get the message that the partitioning on disk /dev/sda is not readable.

Using a GParted Live CD I find that it reads it as unallocated.

There is also two Windows Vista partitions (one with the OS and a data partition)

I also get error messages on boot that it is trying to access beyond the end of the device.

It seems like the partition table is somehow corrupted. Does anyone know how to repair it?

We need some information:

Can you boot into Vista? Did this disk come with the machine or was it added? How were each of the partitions created? Do you have a Live-CD or the SuSE DVD to run in Rescue, so you can do this at the command line as root:

fdisk -l -u

That will tell us what is in the table.

I can boot into Vista, although since I added some RAM recently it has a habit of rebooting spontaneously.

Basically the disk came with the machine with Vista preinstalled, and I installed OpenSUSE 10.2, resizing the NTFS partitions.

I recently upgraded the system to OpenSUSE 11.

I have a NFS mini-iso CD which has a rescue mode. I’ll boot using this once I have finished backing up my data to my external drive in case it all goes wrong.

OK, here’s the output from fdisk -l -u

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1*512 = 512 bytes
Disk identifier: 0xd8b2a64c

Device Boot Start End Blocks Id System
/dev/sda1 2048 3074047 1536000 27 Unknown
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 3074047 44050229 20488091 7 HPFS/NTFS
/dev/sda3 135329792 156312449 10491329 7 HPFS/NTFS
/dev/sda4 45019762 135329791 45155015 f W95 Ext’d (LBA)
Partition 4 does not end on cylinder boundary.
/dev/sda5 62187615 64902599 1357492+ 82 Linux swap / Solaris
/dev/sda6 64902663 81288899 8193118+ 83 Linux
/dev/sda7 81288963 135315494 27013266 83 Linux

I hope this helps.

I wouldn’t conclude yet that the table is damaged. It may be the file system. Things can get weird if it’s 100% full - pieces may be missing.

When you boot SuSE, does the error you get prevent root from mounting? If you can mount the partition, what does the df command report? Have you tried to run e2fsck on it?

By the way, if you’re getting reboots after adding RAM, advise you check the seating of the sticks and run memtest.

I have no problem mounting the partition and fsck reports /dev/sda6 as clean.

df reports
Filesystem 1K-blocks Used Available Mounted on
/dev/sda6 8064272 7706380 0 /

First issue is repairing/preparing the root file system so it can be safely copied from, let alone physically altered.

If you have the space to create another partition, you do not need to resize the root. You can put the contents of one of the subdirectories on the new partition and mount that partition to that subdirectory mount point. So for example, you could copy everything in /usr to the new partition and then mount that partition (in fstab) to /usr.

Whether you take this approach or that of resizing the root partition itself, you need to reclaim some space and do a file system check first. When a partition gets full there can be faulty writes and consequently, reads. So it’s dangerous to try resizing or even copying right now. Even a full backup now may be corrupted and hence unusable.

To reclaim some space, you can (1) delete files out of /tmp. In YaST /etc/sysconfig Editor, look at Cron under System. Note the Max Day, Tmp Dir, and Owner. Set that to 30, /tmp, and blank. After cron next runs, you may have bought several hundred MB.

Then (2) use the tune2fs -m command to reduce the amount of reserved-blocks space. The default is 5%, which typically is plenty more than needed. Set it to 3%. Frees another couple hundred MB.

Reboot. See if df shows space available. You should be able to run e2fsck with the -f option now. Then reboot again.

Now take a look again in YaST Partitioner. Still an error?

Now back to the original question again re resizing root. If there is a problem with the partition table, trying to fix it may make the system unusable. And especially trying to resize it. There are good tools like TestDisk, but there can be unforeseen issues e.g., due to what other software has done with the table (notably Vista). There are lower-level tools like disk editors that enable directly writing to the table, but this is very serious and only for experts. IMO, your best solution is a separate sub-directory partition as described above. At a later point you could copy the root to other storage, delete/re-create the partition, copy back. But again, this means changing the table; if there are still indications of problems with it, you may lose the whole disk. There’s a good chance that if you just leave it alone, have reclaimed space otherwise, and the file system is in good shape again, that you’ll be OK.

I’m doing memtest now, and when I ran the test using both 1Gb sticks, it came up with errors.

However so far each stick individually seems fine. I will test the one I am testing now using the other DIMM slot next, perhaps I have a faulty DIMM slot.

More likely a bad stick. Run the default test set. It will toggle through 9 tests. Can take all night.

What I don’t understand is why they pass when each is tested on their own but fail when both are in at the same time.

It might be that it is 667Mhz memory and my laptop may only be able to cope with 533Mhz.

I think I was confused when I looked it up since there are many different models of A100 Satellite and may have made a mistake.

You said before that “so far” each stick is OK - I took that to mean that you have not finished the individual tests. If in fact you get all the way through the 9 tests on each stick but no error, but you get errors on the pair, then the sticks may be mismatched or the mobo doesn’t like the setup.

Same make/model? Same specs? When you added the new stick, did you check the bios config? - the config may reset with a new stick, and would probably use the SPD, but that can be misread. So be sure that the timings are what they are supposed to be, and that must be within spec on both sticks. Make sure the voltage is right, too. Sometimes mobo’s are very sensitive about RAM.

I take it you had 1 stick, added a second? So, is the board dual-channel? Does that need to be configured somehow? If the board has more than one pair of channels, sure you have both sticks together in the right pair of slots?

Usually the faster RAM can run at the lower speed. If the sticks were outside the <range> the chipset supports, most likely the DIMM’s would have a diff nbr of pins and not fit. Check the bios config - it may be reading the SPD and misconfiguring what the chipset can support. See the clock and the timings manually.

If you mismatched the sticks, a 667 with a 533, usually it will work is the faster one is under-clocked to match the slower. Again, try the bios.

Both the sticks are the same model and specs.

I can’t seem to see any settings for memory in the BIOS. When it boots I get “press f2 for System Utilities” which brings me to PhoenixBIOS Setup Utility. However there is nothing there to specify settings for memory.

Back to the filesystem problems, I did the steps you suggested, and now df displays about 80MB available.

However, the partition table is still unreadable so I cannot create any new partitions or resize existing ones.

I am fully backed up onto my external drive so I think I will have to erase the disk and start again.