Re: running fsck on root filesystem
[EMAIL PROTECTED] wrote: Hi Bill, Thanks for a good reply. Please see my replies inline. [EMAIL PROTECTED] wrote: I have a remote machine on whose boot disk I want to run fsck. Is there any way of booting freebsd form the network and then getting into fixit mode without a cdrom or a floppy ? I am using pxeboot so far. What is happening is that when I put "installFixitHoloShell" in the install.cfg then sysinstall throws me to the shell that is VERY barebones. I can't run even a 'ls'. In this case how do I figure out what disk slices I have in the system and on which I want to run fsck ? A lot you don't say here. One thing is _why_ you want to do this. Another is what you want to do. Your description is pretty vague. ---* Sorry I erred on the side of being laconic. Here is the situation: I have a file in /usr/something/file. Whenever I try to cp it to any other location, the machine freezes! I have tried a tar on the file (machine freezes) and a cat filename (same result). Here is a truss on the copy This doesn't sound good. Make sure you are getting good backups. rack1-104.sjc# truss cp ft-v05.2003-06-30.104501-0700 /tmp stat("/tmp",0xbfbffb90) = 0 (0x0) umask(0x1ff) = 18 (0x12) umask(0x12) = 511 (0x1ff) readlink("/etc/malloc.conf",0xbfbff984,63) ERR#2 'No such file or directory' mmap(0x0,4096,0x3,0x1002,-1,0x0) = -2012909568 (0x88057000) break(0x806b000) = 0 (0x0) break(0x806c000) = 0 (0x0) break(0x806d000) = 0 (0x0) break(0x806e000) = 0 (0x0) stat("ft-v05.2003-06-30.104501-0700",0x806d160) = 0 (0x0) stat("/tmp/ft-v05.2003-06-30.104501-0700",0xbfbffa84) ERR#2 'No such file or directory' open("ft-v05.2003-06-30.104501-0700",0x0,00) = 3 (0x3) open("/tmp/ft-v05.2003-06-30.104501-0700",0x601,0100644) = 4 (0x4) mmap(0x0,5941955,0x1,0x1,3,0x0) = -2012905472 (0x88058000) If I do a cat here is what happens: rack1-104.sjc# truss cat ft-v05.2003-06-30.104501-0700 > /dev/null open("ft-v05.2003-06-30.104501-0700",0x0,00) = 3 (0x3) fstat(1,0xbfbffb30) = 0 (0x0) readlink("/etc/malloc.conf",0xbfbffa90,63) ERR#2 'No such file or directory' mmap(0x0,4096,0x3,0x1002,-1,0x0) = -2012909568 (0x88057000) break(0x805a000) = 0 (0x0) break(0x805b000) = 0 (0x0) read(0x3,0x805a000,0x1000) = 4096 (0x1000) write(1,0x805a000,4096) = 4096 (0x1000) read(0x3,0x805a000,0x1000) = 4096 (0x1000) write(1,0x805a000,4096) = 4096 (0x1000) read(0x3,0x805a000,0x1000) = 4096 (0x1000) write(1,0x805a000,4096) = 4096 (0x1000) read(0x3,0x805a000,0x1000) = 4096 (0x1000) write(1,0x805a000,4096) = 4096 (0x1000) read At this point the machine stops responding to any console or network connections. After a while it spews ethernet flow control frames, indicating that the interrupts from the NIC to the kernel are not being serviced. I did a memory check on the box and it looks ok. So now I suspected the disk...and was looking for a good way to test it. I think you're already testing it. fsck is always run on the root filesystem at boot time, in preen mode. If you're having some sort of filesystem errors, setting fsck_y_enable="YES" in /etc/rc.conf will cause the startup scripts to automatically run 'fsck -y' if fsck fails in preen mode. ---* This is a good suggestion. I need to run it on the /usr slice though. fsck is run on all filesystems that are listed in /etc/fstab during boot. From any shell, you should be able to mount filesystems readonly. When mounted readonly, you can safely run fsck. Use 'mount -r /mountpoint'. Many of your commands are not on the root filesystem, so you may need to mount (for example) /usr before you can execute certain commands. ---* Problem: here is the fstab: # DeviceMountpoint FStype Options Dump Pass# /dev/ad0s1a / ufs rw 1 1 /dev/ad0s1f /tmpufs rw 2 2 /dev/ad0s1g /usrufs rw 2 2 ... When I get to the shell (via sysinstall), I do What do you mean "via sysinstall"? Will the machine not boot? Since this is the /usr partition, there's nothing magical required. Boot the system normally. Then shut down all processes that might access /usr and be sure all files on /usr are closed. Then: umount /usr fsck -yf /dev/ad0s1g Repeat the fsck until it completes without reporting any errors. Then 'mount /usr' and check to see if you can access the file correctly. If you have trou
Re: running fsck on root filesystem
Hi Bill, Thanks for a good reply. Please see my replies inline. [EMAIL PROTECTED] wrote: > I have a remote machine on whose boot disk I want to run fsck. Is there any > way of booting freebsd form the network and then getting into fixit mode > without a cdrom or a floppy ? > > I am using pxeboot so far. What is happening is that when I put > "installFixitHoloShell" in the install.cfg then sysinstall throws me to the > shell that is VERY barebones. I can't run even a 'ls'. In this case how do > I figure out what disk slices I have in the system and on which I want to > run fsck ? A lot you don't say here. One thing is _why_ you want to do this. Another is what you want to do. Your description is pretty vague. ---* Sorry I erred on the side of being laconic. Here is the situation: I have a file in /usr/something/file. Whenever I try to cp it to any other location, the machine freezes! I have tried a tar on the file (machine freezes) and a cat filename (same result). Here is a truss on the copy rack1-104.sjc# truss cp ft-v05.2003-06-30.104501-0700 /tmp stat("/tmp",0xbfbffb90) = 0 (0x0) umask(0x1ff) = 18 (0x12) umask(0x12) = 511 (0x1ff) readlink("/etc/malloc.conf",0xbfbff984,63) ERR#2 'No such file or directory' mmap(0x0,4096,0x3,0x1002,-1,0x0) = -2012909568 (0x88057000) break(0x806b000) = 0 (0x0) break(0x806c000) = 0 (0x0) break(0x806d000) = 0 (0x0) break(0x806e000) = 0 (0x0) stat("ft-v05.2003-06-30.104501-0700",0x806d160) = 0 (0x0) stat("/tmp/ft-v05.2003-06-30.104501-0700",0xbfbffa84) ERR#2 'No such file or directory' open("ft-v05.2003-06-30.104501-0700",0x0,00) = 3 (0x3) open("/tmp/ft-v05.2003-06-30.104501-0700",0x601,0100644) = 4 (0x4) mmap(0x0,5941955,0x1,0x1,3,0x0) = -2012905472 (0x88058000) If I do a cat here is what happens: rack1-104.sjc# truss cat ft-v05.2003-06-30.104501-0700 > /dev/null open("ft-v05.2003-06-30.104501-0700",0x0,00) = 3 (0x3) fstat(1,0xbfbffb30) = 0 (0x0) readlink("/etc/malloc.conf",0xbfbffa90,63) ERR#2 'No such file or directory' mmap(0x0,4096,0x3,0x1002,-1,0x0) = -2012909568 (0x88057000) break(0x805a000) = 0 (0x0) break(0x805b000) = 0 (0x0) read(0x3,0x805a000,0x1000) = 4096 (0x1000) write(1,0x805a000,4096) = 4096 (0x1000) read(0x3,0x805a000,0x1000) = 4096 (0x1000) write(1,0x805a000,4096) = 4096 (0x1000) read(0x3,0x805a000,0x1000) = 4096 (0x1000) write(1,0x805a000,4096) = 4096 (0x1000) read(0x3,0x805a000,0x1000) = 4096 (0x1000) write(1,0x805a000,4096) = 4096 (0x1000) read At this point the machine stops responding to any console or network connections. After a while it spews ethernet flow control frames, indicating that the interrupts from the NIC to the kernel are not being serviced. I did a memory check on the box and it looks ok. So now I suspected the disk...and was looking for a good way to test it. >> fsck is always run on the root filesystem at boot time, in preen mode. If you're having some sort of filesystem errors, setting fsck_y_enable="YES" in /etc/rc.conf will cause the startup scripts to automatically run 'fsck -y' if fsck fails in preen mode. ---* This is a good suggestion. I need to run it on the /usr slice though. >> If you want to change this behaviour, you _could_ edit /etc/rc to change the default handling. >> From any shell, you should be able to mount filesystems readonly. When mounted readonly, you can safely run fsck. Use 'mount -r /mountpoint'. Many of your commands are not on the root filesystem, so you may need to mount (for example) /usr before you can execute certain commands. ---* Problem: here is the fstab: # DeviceMountpoint FStype Options Dump Pass# /dev/ad0s1a / ufs rw 1 1 /dev/ad0s1f /tmpufs rw 2 2 /dev/ad0s1g /usrufs rw 2 2 ... When I get to the shell (via sysinstall), I do # fsck /dev/ad0s1g Can't stat /dev/ad0s1g: No such file or directory Can't stat /dev/ad0s1g: No such file or directory Why can I not see these disks? Is the device path something different. I guees the solaris equivalent of "device to fsck". So there ...a more comprehensive summary :). I will be thankful for any help/suggestions. -ansh mail2web - Check your email from the web at http://mail2web.com/ . ___
Re: running fsck on root filesystem
[EMAIL PROTECTED] wrote: I have a remote machine on whose boot disk I want to run fsck. Is there any way of booting freebsd form the network and then getting into fixit mode without a cdrom or a floppy ? I am using pxeboot so far. What is happening is that when I put "installFixitHoloShell" in the install.cfg then sysinstall throws me to the shell that is VERY barebones. I can't run even a 'ls'. In this case how do I figure out what disk slices I have in the system and on which I want to run fsck ? A lot you don't say here. One thing is _why_ you want to do this. Another is what you want to do. Your description is pretty vague. fsck is always run on the root filesystem at boot time, in preen mode. If you're having some sort of filesystem errors, setting fsck_y_enable="YES" in /etc/rc.conf will cause the startup scripts to automatically run 'fsck -y' if fsck fails in preen mode. If you want to change this behaviour, you _could_ edit /etc/rc to change the default handling. From any shell, you should be able to mount filesystems readonly. When mounted readonly, you can safely run fsck. Use 'mount -r /mountpoint'. Many of your commands are not on the root filesystem, so you may need to mount (for example) /usr before you can execute certain commands. Does this help? -- Bill Moran Potential Technologies http://www.potentialtech.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
running fsck on root filesystem
I have a remote machine on whose boot disk I want to run fsck. Is there any way of booting freebsd form the network and then getting into fixit mode without a cdrom or a floppy ? I am using pxeboot so far. What is happening is that when I put "installFixitHoloShell" in the install.cfg then sysinstall throws me to the shell that is VERY barebones. I can't run even a 'ls'. In this case how do I figure out what disk slices I have in the system and on which I want to run fsck ? Basically I need some equivalent of the Sun command "ok boot net -xs". Thanks, -ansh mail2web - Check your email from the web at http://mail2web.com/ . ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"