Date: Sun, 4 Jun 2006 15:31:52 -0700 From: Garrett Cooper <youshi10@u.washington.edu> To: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: forcing boot Message-ID: <1E4DD202-1F40-4C94-9CE5-B5763D172947@u.washington.edu> In-Reply-To: <a1bf75ae0606041440t7a66cf95s6fc194d6a98dc2e8@mail.gmail.com> References: <a1bf75ae0606041440t7a66cf95s6fc194d6a98dc2e8@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jun 4, 2006, at 2:40 PM, Lawrence Horvath wrote: > How can i force normal boot up even if the filesystem was uncleanly > dismounted, > i have a box that it looks like the HD is failing, but i still need > some of the info off it, so i would like to get it to boot normally > anyway so i can sftp/scp the files off it then i can replace the HD, > but it refuses boot anything but single user mode. > > Thanks > > -- > -Lawrence Don't think you can do that really because it's a failsafe with /etc/ rc. You may just want to try adding noauto to /etc/fstab for the time being so that booting doesn't halt on your system, then login and transfer all the data off your disk that you can. Since TERM isn't set in single-user mode, I've found learning how sed works is a very good thing to do. I believe this would fix your problem (can't test since my FBSD box has been down due to SCSI disk controller/PSU failure): #!/bin/csh FSTAB=/etc/fstab; #just a variable to reference the old fstab if [ -ne $1 ]; then # the device filename length should be non-zero cp -p $FSTAB $FSTAB.tmp; #backup the old fstab cat $FSTAB.tmp | sed -e s|^$1.*rw|$1.*rw,noauto|g > $FSTAB #replace rw for the old partition in fstab with rw,noauto fi -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1E4DD202-1F40-4C94-9CE5-B5763D172947>