Dear list, thanks to a pointer by Jerry Feldman (thanks!) I found out that what made my hard diic grate during boot was indeed the swap partition. To solve the problem, i tried refomatting the sawp partition, but could not find any way to do that (I have SuSE 8.0), neither in Yast nor with command line tools. I tried deleting the swap and recreating it as a reiserfs partition, in yast, iand always got an "fdisk failed" error. After several tries, i decided to "continue" instead of "reboot", and i had an extra reiserfs partition and no grinding. When i deleted that partition and put the swap back in, though (again after several fdisk failures), i got the same grinding back. What i was going to do now, is to delete swap once and for all and never touch my partition table again, but i would like to be sure nothing else is going wrong wth my hard disk. So i would like to know: 1. is there something like "scandisk" under linux (sorry for the "MSism"!) that checks the *surface* of the partition? 2. how can i reformat the swap filesystem (if there is such a thing)? thanks again to all in advance! federico
On Sun, 27 Apr 2003 16:58:42 +0200 Federico Damontewrote: > o i would like to know: > > 1. is there something like "scandisk" under linux (sorry for the > "MSism"!) that checks the *surface* of the partition? > > 2. how can i reformat the swap filesystem (if there is such a thing)? 1. fsck. There is a different fsck for each type of file system. For the most part, you don't need to invoke it manually. (For reiserfs, it is reaserfsck). 2. mkswap will effectively rebuild your swap partition. Assuming your swap partition is /dev/hda2: mkswap -c /dev/hda2 This will do what you want. Make sure that /dev/hda2 is not the active swap partition. You can use swapoff to turn it off and swapon to turn it on. (You should be able to use both reiserfsck and mkswap from the rescue system. NEVER run fsck on a mounted file system -- except on the root file system where you run it with root read-only. Reiserfsck will not repair the mounted root file system). -- Jerry Feldman Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
WARNING: I have never done this! You should check the man page for mkswap, swapon, swapoff, fdisk and fstab. It looks like you will have to turn swapoff. Edit the fstab if you want to use a different swap partition. Mkswap the new partition or on your old partition. Then turn the swapon. Please shutdown all programs possible if for no other reason to fit everything in memory without swap. Do not be surprised if something goes wrong so backup first! On Sunday 27 April 2003 09:58 am, Federico Damonte wrote:
Dear list,
thanks to a pointer by Jerry Feldman (thanks!) I found out that what made my hard diic grate during boot was indeed the swap partition. To solve the problem, i tried refomatting the sawp partition, but could not find any way to do that (I have SuSE 8.0), neither in Yast nor with command line tools.
I tried deleting the swap and recreating it as a reiserfs partition, in yast, iand always got an "fdisk failed" error. After several tries, i decided to "continue" instead of "reboot", and i had an extra reiserfs partition and no grinding. When i deleted that partition and put the swap back in, though (again after several fdisk failures), i got the same grinding back.
What i was going to do now, is to delete swap once and for all and never touch my partition table again, but i would like to be sure nothing else is going wrong wth my hard disk.
So i would like to know:
1. is there something like "scandisk" under linux (sorry for the "MSism"!) that checks the *surface* of the partition?
2. how can i reformat the swap filesystem (if there is such a thing)?
thanks again to all in advance!
federico
On Sun, 27 Apr 2003 10:28:28 -0500 Paul Benjaminwrote: > Please shutdown all programs possible if for no other reason to fit > everything in memory without swap. Do not be surprised if something > goes wrong so backup first! If you only have 1 swap partition available, and you do not want to boot into your rescue system, shutdown to single user mode first. This will flush just about everything from memory. Here are the steps: 1. shutdown now - this transitions you to single user mode. Alternatively, /sbin/init 1 (SuSE 8.0 or greater), 2. You will be asked for the root password. 3. swapoff -a -- turn off swap (or swapoff /dev/hdaX) 4. mkswap /dev/hdaX 5. swapon /dev/HDAX 6. /sbin/init 5 -- return to multi-user mode (5 is graphical SuSE 8.0 or greater). -- Jerry Feldman Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
The 03.04.27 at 16:58, Federico Damonte wrote:
1. is there something like "scandisk" under linux (sorry for the "MSism"!) that checks the *surface* of the partition?
badblocks - search a device for bad blocks Also, assuming your disk is reasonably recent (few years) it will be SMART capable (Self-Monitoring, Analysis and Reporting Technology), and your bios may have support for it. Then try the utility: ide-smart - IDE SMART Checking tool If you suspect a problem, then the best is probably to use utilities from the manufacturer; for example, for Seagate you can download a file to create a boot floppy (dos) with test utilities. The exact meaning of the SMART codes or values depends on the manufacturer. -- Cheers, Carlos Robinson
1. is there something like "scandisk" under linux (sorry for the "MSism"!) that checks the *surface* of the partition?
badblocks - search a device for bad blocks
i ran badblocks on my swap partition, and indeed there are 3 bad blocks on it. I tried running mkswap (with all possible switches) and the bad blocks are still there. Someone know a way out of this trap? sorry for bringing this up at late intervals, but i have very little free time ... federico
Also, assuming your disk is reasonably recent (few years) it will be SMART capable (Self-Monitoring, Analysis and Reporting Technology), and your bios may have support for it. Then try the utility:
ide-smart - IDE SMART Checking tool
If you suspect a problem, then the best is probably to use utilities from the manufacturer; for example, for Seagate you can download a file to create a boot floppy (dos) with test utilities. The exact meaning of the SMART codes or values depends on the manufacturer.
-- Cheers, Carlos Robinson
The 03.05.06 at 15:45, Federico Damonte wrote:
i ran badblocks on my swap partition, and indeed there are 3 bad blocks on it. I tried running mkswap (with all possible switches) and the bad blocks are still there. Someone know a way out of this trap?
-c Check the device (if it is a block device) for bad blocks before creating the swap area. If any are found, the count is printed. (search the man page for the word "bad", there are more comments on it) Then they should automatically be marked and not used, I suppose.
sorry for bringing this up at late intervals, but i have very little free time ...
No problem. -- Cheers, Carlos Robinson
The 03.05.06 at 15:45, Federico Damonte wrote:
i ran badblocks on my swap partition, and indeed there are 3 bad blocks on it.
I would advise you again to check SMART.
ide-smart - IDE SMART Checking tool
-- Cheers, Carlos Robinson
participants (4)
-
Carlos E. R.
-
Federico Damonte
-
Jerry Feldman
-
Paul Benjamin