Today I was unable to get my Suse 9.0 system to boot as each time I Ctrl-D'd it rebooted and told me to run fsck manually. I thought GREAT :( but having asked before on the list I booted with my boot diskette and was presented with the options of boot from harddisk, installation, safe mode, manual install and rescue etc. I tried the rescue to no avail and even entered the command fsck -VAa / into the additional options with NO luck. How the hell do I get my system back by completing the fsck!! Desperate Hylton
Rh Conacher <hylton@global.co.za> [24 Feb 2004 19:51:44 +0200 (SAST)]:
I tried the rescue to no avail and even entered the command fsck -VAa / into the additional options with NO luck.
That won't work when you have boot the rescue system, as / is part of the ramdisk. From the rescue system give fsck the partition on which your / resides, i.e. something like 'fsck -VAa /dev/hda2'. Philipp
Today I was unable to get my Suse 9.0 system to boot as each time I Ctrl-D'd it rebooted and told me to run fsck manually.
I thought GREAT :( but having asked before on the list I booted with my boot diskette and was presented with the options of boot from harddisk, installation, safe mode, manual install and rescue etc.
I tried the rescue to no avail and even entered the command fsck -VAa / into the additional options with NO luck.
How the hell do I get my system back by completing the fsck!! Depends on what file system you have. If you have ext2 or 3. Assume that /dev/hda1 is root, and /dev/hda2 is a mountable file system, such as /home. When you run fsck from single user mode, make sure that the root
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 24 Feb 2004 19:51:44 +0200 (SAST) Rh Conacher <hylton@global.co.za> wrote: partition is mounted read-only. You can test this by trying to create a file. You'll get permission denied if root is mounted ro. If you can write to root, then: mount -o ro,remount / Make sure the mountable file systems are unmounted. They should be in single user mode when you boot. fsck -fsy /dev/hda1 /dev/hda2 fsck is a generic wrapper to the filesystem specific fscks. If you have reiserfs, then reiser will not let you fix the root file system while it is mounted. So, boot the rescue, and run reiserfsck: reiserfsck --fix-fixable /dev/hda1 There are other options on reiserfsck, but the man page is explicit enough. - -- Jerry Feldman <gaf@blu.org> 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAO7SD+wA+1cUGHqkRAkvCAJ99jFUJF6X3NmpOdcJV+v+dVj4ojACfZRMm TAhnFM8M/+DzyAy+Wx/b9Cc= =u+H6 -----END PGP SIGNATURE-----
Jerry Feldman wrote:
On Tue, 24 Feb 2004 19:51:44 +0200 (SAST) Rh Conacher <hylton@global.co.za> wrote:
Today I was unable to get my Suse 9.0 system to boot as each time I Ctrl-D'd it rebooted and told me to run fsck manually.
I thought GREAT :( but having asked before on the list I booted with my boot diskette and was presented with the options of boot from harddisk, installation, safe mode, manual install and rescue etc.
I tried the rescue to no avail and even entered the command fsck -VAa / into the additional options with NO luck. ie the additional command line options you can insert into LiLo
How the hell do I get my system back by completing the fsck!!
Depends on what file system you have. Ext3 mainly and maybe a FAT/FAT32 partition.
If you have ext2 or 3. Assume that /dev/hda1 is root, and /dev/hda2 is a mountable file system, such as /home. mmm, I do not have a hda at all. someone told me about a month ago that it was reserved for the bootsector eventhough I had a separate /boot partition. Regardless of what is what I would like to be able to boot from my stiffy and fsck and repair the fstab table.
When you run fsck from single user mode, make sure that the root partition is mounted read-only. You can test this by trying to create a file. You'll get permission denied if root is mounted ro. If you can write to root, then: mount -o ro,remount / How do I get to single user mode after booting from my bootdisk? It is
Below is the BIOS entries and fstab: BIOS: Primary Master: CD-ROM Primary slave: 20 Gb main linux drive Secondary slave: 7.5Gb disk for backup FSTAB: /dev/hdb1 / ext3 defaults 1 1 /dev/hdb9 /boot ext3 defaults 1 2 #/dev/hdc2 /data1 auto noauto,user 0 0 #/dev/hdc7 /data2 auto noauto,user 0 0 #/dev/hdc9 /data3 auto noauto,user 0 0 /dev/hdd1 /data4 auto noauto,user 0 0 /dev/hdb8 /home ext3 defaults 1 2 /dev/hdb10 /opt ext3 defaults 1 2 /dev/hdb6 /usr ext3 defaults 1 2 /dev/hdb7 /var ext3 defaults 1 2 /dev/hdc1 /windows/C vfat defaults 0 0 /dev/hdc5 /windows/D vfat defaults 0 0 /dev/hdc6 /windows/E vfat defaults 0 0 /dev/hdb5 swap swap pri=42 0 0 #/dev/hdc8 swap swap pri=42 0 0 devpts /dev/pts devpts mode=0620,gid=5 0 0 proc /proc proc defaults 0 0 usbdevfs /proc/bus/usb usbdevfs noauto 0 0 /dev/cdrom /media/cdrom auto ro,noauto,user,exec 0 0 /dev/fd0 /media/floppy auto noauto,user,sync 0 0 I have since removed hdc and put it into another machine. the root partition I want to check and therefore it can't even be ro, especially if I want to repair it? Reading through the 'man fsck' pages again I wrote down what options I would like: fsck -asACV What must I do to get to a point where issuing the above command or summat similar is possible? I mean I am booting from a stiffy and in theory only mounting the stiffy fs to repair and go through the fstab file surely? FSCKing procedure is something I ain't EVER going to forget, believe me. :) -- The Little Helper ======================================================================== Hylton Conacher - Licenced ex-Windows user (apart from Quicken) Registered Linux user # 229959 at http://counter.li.org Currently using SuSE 9.0 Professional with KDE 3.1 ========================================================================
The Tuesday 2004-02-24 at 19:51 +0200, Rh Conacher wrote:
Today I was unable to get my Suse 9.0 system to boot as each time I Ctrl-D'd it rebooted and told me to run fsck manually.
Of course: it will not boot till you run fsck manually, exactly as it says. If it is giving a prompt, it is expecting you to run fsck right then and there. When you correct the problem, then ^D will close and reboot - this time correctly, as you are supposed to have corrected the error :-p
I tried the rescue to no avail and even entered the command fsck -VAa / into the additional options with NO luck.
Not "/", but /dev/hdaX, where X is the number of the partition you have to check, and hda might be hdb, or whatever. You must know that yourself. Hold on a moment... Additional options? It is a command to be entered at a command line prompt. Where are you typing it?
How the hell do I get my system back by completing the fsck!!
Well... The man pages of e2fsck and resiserfsck are printed at the end of the SuSE admin book just for these ocassions.
Desperate
Hylton
I understand those feelings. There is always a first time; the next will be easier. -- Cheers, Carlos Robinson
Carlos E. R. wrote:
The Tuesday 2004-02-24 at 19:51 +0200, Rh Conacher wrote:
Today I was unable to get my Suse 9.0 system to boot as each time I Ctrl-D'd it rebooted and told me to run fsck manually.
Of course: it will not boot till you run fsck manually, exactly as it says. If it is giving a prompt, it is expecting you to run fsck right then and there. When you correct the problem, then ^D will close and reboot - this time correctly, as you are supposed to have corrected the error :-p When it wanted to fsck it was asking me for the root password. entering it and pressing enter brought up that the system could not find locale. ??
I tried the rescue to no avail and even entered the command fsck -VAa / into the additional options with NO luck.
Not "/", but /dev/hdaX, where X is the number of the partition you have to check, and hda might be hdb, or whatever. You must know that yourself. In my case with all the partition in the fstasb file I figured it would just be better to walk through that and fsck the lot.
Hold on a moment... Additional options? It is a command to be entered at a command line prompt. Where are you typing it? When LiLo rears its bootloader it has a few options namely Boot from local harddisk, boot safely, rescue mode and a couple of others. Just below it is a space to enter cli commands. That is where I added the additional options.
How the hell do I get my system back by completing the fsck!!
Well...
The man pages of e2fsck and resiserfsck are printed at the end of the SuSE admin book just for these ocassions. Bloody hell, why did they have to call it another name! Why not just call it fsck related man pages. I'll have a look but I doubt it is going to show me anything that I haven't already seen in the special edition if Using Linux or my Linux+ certification book.
Desperate Hylton
I understand those feelings. There is always a first time; the next will be easier. ALOT EASIER. I am never going to forget how to run FSCK on a system again, I think.
-- The Little Helper ======================================================================== Hylton Conacher - Licenced ex-Windows user (apart from Quicken) Registered Linux user # 229959 at http://counter.li.org Currently using SuSE 9.0 Professional with KDE 3.1 ========================================================================
The Thursday 2004-02-26 at 15:57 +0200, Hylton Conacher (ZR1HPC) wrote:
When it wanted to fsck it was asking me for the root password. entering it and pressing enter brought up that the system could not find locale. ??
Mmm. If the problem is in the root partition, it may have problems reading some files. Also, considering your fstab: /dev/hdb1 / ext3 defaults 1 1 /dev/hdb9 /boot ext3 defaults 1 2 /dev/hdb8 /home ext3 defaults 1 2 /dev/hdb10 /opt ext3 defaults 1 2 /dev/hdb6 /usr ext3 defaults 1 2 /dev/hdb7 /var ext3 defaults 1 2 At that point, only "/" is mounted, not "/usr" nor "/var" - it may need something in there. It is not the first time they put something in /usr that is needed during the manual fsck part.
I tried the rescue to no avail and even entered the command fsck -VAa / into the additional options with NO luck.
Not "/", but /dev/hdaX, where X is the number of the partition you have to check, and hda might be hdb, or whatever. You must know that yourself. In my case with all the partition in the fstasb file I figured it would just be better to walk through that and fsck the lot.
Eummmm.... I have an idea, read on.
Hold on a moment... Additional options? It is a command to be entered at a command line prompt. Where are you typing it? When LiLo rears its bootloader it has a few options namely Boot from local harddisk, boot safely, rescue mode and a couple of others. Just below it is a space to enter cli commands. That is where I added the additional options.
Gosh! No wonder it doesn't work! Commands have to be entered at a command prompt Ok, I don't have SuSE 9.0, only 8.2, but I can guess what that rescue entry is. Not good enough in this case. You need to boot the rescue system, from the CD or DVD, not from the HD. Get to the bash command prompt there, and issue the fsck command plus options there. Something like "fsck /dev/hdb1". Now my second idea, your fstab, which I saw on another post. There you have entries for hdb and hdc - but you mention that hdc was later removed. If there are entries for hdc (hdc1, for example, a windows mount), but no hdc disk on the system, it will not boot! And it will precisely tell you to fsck manually. So, you have to manually mount that disk from inside the rescue CD, edit the fstab (with vi, I don't think there is anything else there), and comment out those lines.
How the hell do I get my system back by completing the fsck!!
Well...
The man pages of e2fsck and resiserfsck are printed at the end of the SuSE admin book just for these ocassions.
Bloody hell, why did they have to call it another name!
e2fsck vs fsck? Well, fsck just calls e2fsck or others as appropriate.
Why not just call it fsck related man pages. I'll have a look but I doubt it is going to show me anything that I haven't already seen in the special edition if Using Linux or my Linux+ certification book.
:-) I read "the handbook" from first to last page time ago, on another version (smaller), and I knew those man pages were printed there, because you need them precisely when you can not read man pages on the broken computer.
Desperate Hylton
I understand those feelings. There is always a first time; the next will be easier. ALOT EASIER. I am never going to forget how to run FSCK on a system again, I think.
I wrote my notes about this on a handbook, but they are on another city right now. O:-) -- Cheers, Carlos Robinson
The Thursday 2004-02-26 at 15:57 +0200, Hylton Conacher (ZR1HPC) wrote:
....fscking the system and repairing the fs if necessary.....
Mmm. If the problem is in the root partition, it may have problems reading some files. Also, considering your fstab:
/dev/hdb1 / ext3 defaults 1 1 /dev/hdb9 /boot ext3 defaults 1 2 /dev/hdb8 /home ext3 defaults 1 2 /dev/hdb10 /opt ext3 defaults 1 2 /dev/hdb6 /usr ext3 defaults 1 2 /dev/hdb7 /var ext3 defaults 1 2
At that point, only "/" is mounted, not "/usr" nor "/var" - it may need something in there. It is not the first time they put something in /usr that is needed during the manual fsck part. So basically the program needed might not be accessible from the hdb
Carlos E. R. wrote: partitions. GREAT :( [snip]
In my case with all the partition in the fstasb file I figured it would just be better to walk through that and fsck the lot with thfsck -VAa option.
Eummmm.... I have an idea, read on.
Hold on a moment... Additional options? It is a command to be entered at a command line prompt. Where are you typing it?
When LiLo rears its bootloader it has a few options namely Boot from local harddisk, boot safely, rescue mode and a couple of others. Just below it is a space to enter cli commands. That is where I added the additional options.
Gosh! No wonder it doesn't work! Commands have to be entered at a command prompt Oops :)
OK, my new understanding so far ie: 1. Don't fsck a mounted partition 2. Boot from a CD/floppy to get cli access
Ok, I don't have SuSE 9.0, only 8.2, but I can guess what that rescue entry is. Not good enough in this case. I dunno, but it sure as hell is on the lilo menu if I boot from CD.
You need to boot the rescue system, from the CD or DVD, not from the HD. OK that's easy enough ie insert CD 1 and reboot...np.
Get to the bash command prompt there.... HOW?? When the machine reboots I am presented with a lilo graphical menu enabling me to either Boot from HDD, Installation, Installation with ACPI disabled, Install - Safe settings, Manual install, Rescue System, Memory Test. There is no option to go into a CLI mode???
....., and issue the fsck command plus options there. Something like "fsck /dev/hdb1". OK understood, but getting to the CLI from CD 1 seems to be the problem ie is there some special Susian key combination needed to access it or something...like Ctrl-Alt-Del :) Asides from that then how am I going to be able to issue a fsck command
Now my second idea, your fstab, which I saw on another post. There you have entries for hdb and hdc - but you mention that hdc was later removed. If there are entries for hdc (hdc1, for example, a windows mount), but no hdc disk on the system, it will not boot! And it will precisely tell you to fsck manually. surprise, surprise, the system still boots OK, into linux thankfully. hdc contained Win95 and was moved for testing purposes. It will never be reinstalled into the linux machine. I was wondering about commenting out
Choosing the Rescue System option the system starts asking me about my kb type. Right there and then I exited out of it as it looked too much like install, and asides you said to get into a CLI. like -VAa which will step through the fstab file if the fsck doesn't know where to find it? those entries of hdc or even deleting them.
So, you have to manually mount that disk from inside the rescue CD, edit the fstab (with vi, I don't think there is anything else there), and comment out those lines. KWrite will do it too thankfully when logged into another X session.
How the hell do I get my system back by completing the fsck!!
Well...
The man pages of e2fsck and resiserfsck are printed at the end of the SuSE admin book just for these ocassions. so I see....but there aren't half the options listed there that are listed on the fsck man page. I'll resort to my own written notes about this.
I wrote my notes about this on a handbook, but they are on another city right now. O:-) UPS delivers worldwide I hear :)
A little informed but still desperate to fsck (defrag?) the system. I am trying to leave the machine on as much as possible here and so far haven't been hit by a power outage....yet. When it does hit I am going to need to know howto use this fsck thing immediately. So the questions remain: 1. How to get to the CLI from the rescue option when booting off the CD? 2. How can I get fsck to walk through my fstab file if the / partition isn't mounted? 3. What fsck -option would be the best to check and repair the fs's and also give me verbose output and a progress bar Hylton -- The fscking desperate Little Helper ======================================================================== Hylton Conacher - Licenced ex-Windows user (apart from Quicken) Registered Linux user # 229959 at http://counter.li.org Currently using SuSE 9.0 Professional with KDE 3.1 ========================================================================
<snip>
A little informed but still desperate to fsck (defrag?) the system. I am trying to leave the machine on as much as possible here and so far haven't been hit by a power outage....yet. When it does hit I am going to need to know howto use this fsck thing immediately.
So the questions remain: 1. How to get to the CLI from the rescue option when booting off the CD? 2. How can I get fsck to walk through my fstab file if the / partition isn't mounted? 3. What fsck -option would be the best to check and repair the fs's and also give me verbose output and a progress bar
Hylton -- The fscking desperate Little Helper
1. Boot to the DVD / cd #1 2. select rescue 3. If asked for your language select what is right for you. 4. Make sure that you load any/all modules for the FS that you use. 5. Continue to boot to the rescue system. 6. At the login prompt use root for the login. 7. fsck any filesystems needing repair. Additional tasks that can be done from here mount your / filesystem to /mnt i.e.: mount /dev/hda# /mnt (use the number that is correct for your installation. cd /mnt chroot /mnt mount any additional filesystem you need, i.e.: /boot if on a seperate partition. At this point you can add and remove packages using rpm manually even kernel versions and sources required if you move your harddrive to another MB using a different processor. Run mkinitrd to create the boot environment. ----------------- I require a special module to access the Ultra ATA 100 raid controller which is -not- provided by SuSE (or any other linux supplier) because it is not 100% opensource and I need to compile my own module which I can do in the above rescue mode and then add the module to the /lib/modules tree so I can boot using it. Another command I have found to build the modules tree so that mkinitmd will build the tree is: depmod.old -a <kernel version (2.4.166-default)> -f /boot/System.map-<kernel version>. meaning I can be running the .144 kernel version and build the modules.dep file for the .166 kernel which is needed to run mkinitrd for the .166 kernel that I want ot boot to. Sorry to get so long winded but wanted to pass on some of my experiences. Ken Schneider
Ken Schneider wrote:
<snip>
A little informed but still desperate to fsck (defrag?) the system. I am trying to leave the machine on as much as possible here and so far haven't been hit by a power outage....yet. When it does hit I am going to need to know howto use this fsck thing immediately.
So the questions remain: 1. How to get to the CLI from the rescue option when booting off the CD? 2. How can I get fsck to walk through my fstab file if the / partition isn't mounted? 3. What fsck -option would be the best to check and repair the fs's and also give me verbose output and a progress bar
Hylton -- The fscking desperate Little Helper
1. Boot to the DVD / cd #1
2. select rescue
3. If asked for your language select what is right for you.
4. Make sure that you load any/all modules for the FS that you use.
5. Continue to boot to the rescue system.
6. At the login prompt use root for the login.
7. fsck any filesystems needing repair. How can I get it to fsck the entries in my fstab file? Cos as sure as lemons is lemons I can't remember it?
Additional tasks that can be done from here
mount your / filesystem to /mnt i.e.: mount /dev/hda# /mnt (use the number that is correct for your installation. Why are you mounting them when fscking can only be performed on unmounted drives? Or is this so I can execute the additional tasks?
cd /mnt
chroot /mnt
mount any additional filesystem you need, i.e.: /boot if on a separate partition.
At this point you can add and remove packages using rpm manually even kernel versions and sources required if you move your harddrive to another MB using a different processor.
Run mkinitrd to create the boot environment. If there was no 'additional stuff' to do does the mkinitrd still need to be done after a fsck?
[snipped and partially understood]
.....I require a special module to access the Ultra ATA 100 raid controller ................
Sorry to get so long winded but wanted to pass on some of my experiences. np on the looong windedness. It is appreciated
Ken Schneider -- The Little Helper ======================================================================== Hylton Conacher - Licenced ex-Windows user (apart from Quicken) Registered Linux user # 229959 at http://counter.li.org Currently using SuSE 9.0 Professional with KDE 3.1 ========================================================================
Hylton Conacher (ZR1HPC) wrote:
Carlos E. R. wrote:
The Thursday 2004-02-26 at 15:57 +0200, Hylton Conacher (ZR1HPC) wrote:
....fscking the system and repairing the fs if necessary.....
Mmm. If the problem is in the root partition, it may have problems reading some files. Also, considering your fstab:
/dev/hdb1 / ext3 defaults 1 1 /dev/hdb9 /boot ext3 defaults 1 2 /dev/hdb8 /home ext3 defaults 1 2 /dev/hdb10 /opt ext3 defaults 1 2 /dev/hdb6 /usr ext3 defaults 1 2 /dev/hdb7 /var ext3 defaults 1 2
At that point, only "/" is mounted, not "/usr" nor "/var" - it may need something in there. It is not the first time they put something in /usr that is needed during the manual fsck part.
So basically the program needed might not be accessible from the hdb partitions. GREAT :(
[snip]
In my case with all the partition in the fstasb file I figured it would just be better to walk through that and fsck the lot with thfsck -VAa option.
Eummmm.... I have an idea, read on.
Hold on a moment... Additional options? It is a command to be entered at a command line prompt. Where are you typing it?
When LiLo rears its bootloader it has a few options namely Boot from local harddisk, boot safely, rescue mode and a couple of others. Just below it is a space to enter cli commands. That is where I added the additional options.
Gosh! No wonder it doesn't work! Commands have to be entered at a command prompt
Oops :)
OK, my new understanding so far ie: 1. Don't fsck a mounted partition 2. Boot from a CD/floppy to get cli access
Ok, I don't have SuSE 9.0, only 8.2, but I can guess what that rescue entry is. Not good enough in this case.
I dunno, but it sure as hell is on the lilo menu if I boot from CD.
You need to boot the rescue system, from the CD or DVD, not from the HD.
OK that's easy enough ie insert CD 1 and reboot...np.
Get to the bash command prompt there....
HOW?? When the machine reboots I am presented with a lilo graphical menu enabling me to either Boot from HDD, Installation, Installation with ACPI disabled, Install - Safe settings, Manual install, Rescue System, Memory Test. There is no option to go into a CLI mode???
Choosing the Rescue System option the system starts asking me about my kb type. Right there and then I exited out of it as it looked too much like install, and asides you said to get into a CLI.
....., and issue the fsck command plus
options there. Something like "fsck /dev/hdb1".
OK understood, but getting to the CLI from CD 1 seems to be the problem ie is there some special Susian key combination needed to access it or something...like Ctrl-Alt-Del :) Asides from that then how am I going to be able to issue a fsck command like -VAa which will step through the fstab file if the fsck doesn't know where to find it?
Now my second idea, your fstab, which I saw on another post. There you have entries for hdb and hdc - but you mention that hdc was later removed. If there are entries for hdc (hdc1, for example, a windows mount), but no hdc disk on the system, it will not boot! And it will precisely tell you to fsck manually.
surprise, surprise, the system still boots OK, into linux thankfully. hdc contained Win95 and was moved for testing purposes. It will never be reinstalled into the linux machine. I was wondering about commenting out those entries of hdc or even deleting them.
So, you have to manually mount that disk from inside the rescue CD, edit the fstab (with vi, I don't think there is anything else there), and comment out those lines.
KWrite will do it too thankfully when logged into another X session.
How the hell do I get my system back by completing the fsck!!
Well...
The man pages of e2fsck and resiserfsck are printed at the end of the SuSE admin book just for these ocassions.
so I see....but there aren't half the options listed there that are listed on the fsck man page. I'll resort to my own written notes about this.
I wrote my notes about this on a handbook, but they are on another city right now. O:-)
UPS delivers worldwide I hear :)
A little informed but still desperate to fsck (defrag?) the system. I am trying to leave the machine on as much as possible here and so far haven't been hit by a power outage....yet. When it does hit I am going to need to know howto use this fsck thing immediately.
So the questions remain: 1. How to get to the CLI from the rescue option when booting off the CD? 2. How can I get fsck to walk through my fstab file if the / partition isn't mounted? 3. What fsck -option would be the best to check and repair the fs's and also give me verbose output and a progress bar On further reading the administration guide it would seem I need to access the initrd off the floppy but only allow the ramdisk to load into memory. From there I need to use it to fsck but must stop it from continuing to load the HDD system etc.
Hylton
-- The Little Helper ======================================================================== Hylton Conacher - Licenced ex-Windows user (apart from Quicken) Registered Linux user # 229959 at http://counter.li.org Currently using SuSE 9.0 Professional with KDE 3.1 ========================================================================
Hylton Conacher (ZR1HPC) wrote:
Carlos E. R. wrote:
The Thursday 2004-02-26 at 15:57 +0200, Hylton Conacher (ZR1HPC) wrote:
....fscking the system and repairing the fs if necessary..... I read the SuSE help on the rescue system and noted there what it had to say about creating and using a rescue disk.
Whenever I use Yast to create the rescue floppy it does the creation fine but it always reports an error on verifying the floppy. And I thought that perhaps I might have the bad floppy in the box so I tried it with two others from different boxes as well. With my current problems and suggestions in creating the necessary rescue floppy disk (Thanks Carlos and others), I decided to try the rescue system under the manual install on the CD ie boot and run everything from CD1. I would like to report that all worked well... until I got to the cli point where I could enter a cli command ie after logging in. What I would like to do is fsck all the unmounted filesystems (entries in the fstab table), how can I get fsck or even e2fsck to do this? And no I cannot remember all the entries in the fstab file....yet. If I can get to the cli, what command and options do you suggest? I would assume fsck but the entries in the man pages and those displayed by the fsck help in the rescue system are different. Bear in mind my above paragraph as to what I want to do. OK, my new understanding so far ie: 1. Don't fsck a mounted partition 2. Boot from a CD to get cli access under rescue 3. Access rescue by booting off CD, selecting manual install and then the rescue option from there, after choosing kb and language. 4. Login as root (no password required 5. Enter ............................... to fsck the system Am I correct in assuming that fsck is like a combination of scandisk and defrag on a Windows system? While I understand it doesn't need to be run nearly as often, except under exceptional circumstances, on a journaling fs, it can normally do no harm, especially after a power outage/hard reboot? About right??? -- The Little Helper ======================================================================== Hylton Conacher - Licenced ex-Windows user (apart from Quicken) Registered Linux user # 229959 at http://counter.li.org Currently using SuSE 9.0 Professional with KDE 3.1 ========================================================================
The 2004-02-29 at 15:28 +0200, Hylton Conacher (ZR1HPC) wrote:
....fscking the system and repairing the fs if necessary..... I read the SuSE help on the rescue system and noted there what it had to say about creating and using a rescue disk.
Whenever I use Yast to create the rescue floppy it does the creation fine but it always reports an error on verifying the floppy. And I thought that perhaps I might have the bad floppy in the box so I tried it with two others from different boxes as well.
Use the one on the CD, unless you have special needs. It is safer. Interestingly, floppy disks seems to be much lower quality than they were some years ago. I still keep workable 100 flopies hard disk backups, done some 10 years ago... today, when I have to save something to a floppy to take one or two files somewhere else, I use double or tripple copies, ie, two or three disks, because too often they fail :-( [rescue CD]
I would like to report that all worked well... until I got to the cli point where I could enter a cli command ie after logging in.
What I would like to do is fsck all the unmounted filesystems (entries in the fstab table), how can I get fsck or even e2fsck to do this? And no I cannot remember all the entries in the fstab file....yet.
Print or hand copy it to your notebook. No excuses :-)
If I can get to the cli, what command and options do you suggest? I would assume fsck but the entries in the man pages and those displayed by the fsck help in the rescue system are different. Bear in mind my above paragraph as to what I want to do.
See my other email on this, a few minutes ago - for an ext2 fs. The info "fsck --help" gives is more current, but of course, too terse.
OK, my new understanding so far ie: 1. Don't fsck a mounted partition 2. Boot from a CD to get cli access under rescue 3. Access rescue by booting off CD, selecting manual install and then the rescue option from there, after choosing kb and language.
Not needed on current versions, there is a separate "rescue system" option right on booting.
4. Login as root (no password required 5. Enter ............................... to fsck the system
Right.
Am I correct in assuming that fsck is like a combination of scandisk and defrag on a Windows system?
Er... not defrag, that is not done in linux, it is not needeed. But if I remember correctly, fsck will inform you on the fragmentation level, usually below 1 or 2%.
While I understand it doesn't need to be run nearly as often, except under exceptional circumstances, on a journaling fs, it can normally do no harm, especially after a power outage/hard reboot?
Right, on those circunstances it is forced. On a not journalling fs (ext2, for example), it is also run once every 10 or 20 mounts, and it takes a quite long time.
About right???
Yes :-) -- Cheers, Carlos Robinson
The 2004-02-28 at 18:35 +0200, Hylton Conacher (ZR1HPC) wrote:
At that point, only "/" is mounted, not "/usr" nor "/var" - it may need something in there. It is not the first time they put something in /usr that is needed during the manual fsck part. So basically the program needed might not be accessible from the hdb partitions. GREAT :(
Note: _might_ - ie, not necesarily "will not".
OK, my new understanding so far ie: 1. Don't fsck a mounted partition 2. Boot from a CD/floppy to get cli access
Correct. Better from the CD, less work.
Ok, I don't have SuSE 9.0, only 8.2, but I can guess what that rescue entry is. Not good enough in this case. I dunno, but it sure as hell is on the lilo menu if I boot from CD.
You need to boot the rescue system, from the CD or DVD, not from the HD. OK that's easy enough ie insert CD 1 and reboot...np.
Get to the bash command prompt there.... HOW?? When the machine reboots I am presented with a lilo graphical menu enabling me to either Boot from HDD, Installation, Installation with ACPI disabled, Install - Safe settings, Manual install, Rescue System, Memory Test. There is no option to go into a CLI mode???
Select "Rescue system", while booting from the CD.
Choosing the Rescue System option the system starts asking me about my kb type. Right there and then I exited out of it as it looked too much like install, and asides you said to get into a CLI.
Actually, it is probably the same thing as the install part, with a different config or init or whatever. The rescue system has to boot from CD a system it knows nothing about, using a CD... exactly the same as it does for installing. No wonder it asks for the keyboard. You should get to the CLI after one or two selections (language...). Another way to get there was (time ago) to start the install, then press "ESC" - or even ctrl-alt-F2 to it.
....., and issue the fsck command plus options there. Something like "fsck /dev/hdb1". OK understood, but getting to the CLI from CD 1 seems to be the problem ie is there some special Susian key combination needed to access it or something...like Ctrl-Alt-Del :)
No :-) Anyways, the rescue system must be explained on the book - it is chapter 11, in suse 8.2
Asides from that then how am I going to be able to issue a fsck command like -VAa which will step through the fstab file if the fsck doesn't know where to find it?
Ah, you can't. You need to have somethings printed before hand: the partition table, the fstab file... with that paper, you first check the main partition, the one that holds "/"
Now my second idea, your fstab, which I saw on another post. There you have entries for hdb and hdc - but you mention that hdc was later removed. If there are entries for hdc (hdc1, for example, a windows mount), but no hdc disk on the system, it will not boot! And it will precisely tell you to fsck manually.
surprise, surprise, the system still boots OK, into linux thankfully. hdc contained Win95 and was moved for testing purposes. It will never be reinstalled into the linux machine. I was wondering about commenting out those entries of hdc or even deleting them.
Maybe 9.0 is cleverer. Once I had a non booting linux system because I had removed a disk or a partition without editing the fstab file. Perhaps... it could be that windows partitions are not checked.
So, you have to manually mount that disk from inside the rescue CD, edit the fstab (with vi, I don't think there is anything else there), and comment out those lines. KWrite will do it too thankfully when logged into another X session.
That's not fair :-p There is no X system on the rescue system.
How the hell do I get my system back by completing the fsck!!
Well...
The man pages of e2fsck and resiserfsck are printed at the end of the SuSE admin book just for these ocassions. so I see....but there aren't half the options listed there that are listed on the fsck man page. I'll resort to my own written notes about this.
I wrote my notes about this on a handbook, but they are on another city right now. O:-) UPS delivers worldwide I hear :)
Provided there is somebody there with the kind of knowledge needed to find somebody else's book under a pile of them ;-) Heh, I'm right now at that other city, with another older computer: P130-32Mb... Slowwww! But I found one of my notebooks: For ext2 filesystems, I used "e2fsck -f -v -C0 /dev/hda3" or "e2fsck -f -c -v -C0 /dev/hda3" - the second one does a badblock check. Of course, you need to change "hda3" with your device and partition number.
A little informed but still desperate to fsck (defrag?) the system.
No, not defrag. It is equivalent to the windows "chkdsk program"
I am trying to leave the machine on as much as possible here and so far haven't been hit by a power outage....yet. When it does hit I am going to need to know howto use this fsck thing immediately.
So the questions remain: 1. How to get to the CLI from the rescue option when booting off the CD?
Somewhere above.
2. How can I get fsck to walk through my fstab file if the / partition isn't mounted?
You can't. If needed, you can mount it read-only under "/mnt", as "Ken Schneider" said. Otherwise, I prefer to issue "fdisk -l" to list the partitions and have educated guesses.
3. What fsck -option would be the best to check and repair the fs's and also give me verbose output and a progress bar
-v -C0 But one filesystem at a time, manually. Notice, by the way, that if the fstab contain the wrong info, it will force you to a manual fsck instead of an automatic one. -- Cheers, Carlos Robinson
participants (6)
-
Carlos E. R.
-
Hylton Conacher (ZR1HPC)
-
Jerry Feldman
-
Ken Schneider
-
Philipp Thomas
-
Rh Conacher