Re: [SLUG] need some guidance, had a scare last night.

From: Derek Glidden (dglidden@illusionary.com)
Date: Wed May 02 2001 - 11:23:08 EDT


patrick grantham wrote:
>
> On by box running suse 7.1, a seconday-slave hard disk failed. When I
> removed it, linux failed to load normally. It was indeed a hardware
> failure. The platters sounded as though they were not reaching the normal
> speed, before resetting, continually. During the load attempts it was noted
> that the drive may be missing. For the life of me, I could not figure out
> how to update the system such that this drive no longer exists. I had to
> dig out of a box, an old West Dig IDE attach it for the system to boot
> normally. I realize my inexperience at this level shows, but what do you do
> to completely remove a drive "properly?"

[Ed. - All this has worked for the author on many occasions, however
there is a miniscule but non-zero chance that you can trash your entire
system by doing this sort of stuff. This is fairly deep magic. Don't
try it if you aren't comfortable running as close to the bare metal as
Linux will allow you.]

You'll want to boot so you bypass all your normal init scripts. Doing
this is going to be different based on what distro you're using. If it
uses LILO, most will accept something like this at the LILO "boot:"
prompt:

LILO [you press the 'Alt' key]

boot: [you press the 'Tab' key to see what kernels are available]

linux backup reallyold

boot: [you type 'linux 1']

Unfortunately on at least a couple distros I've seen, doing it this way
will in fact boot into single-user mode, after going through the normal
boot process which tries to mount all your partitions, which is entirely
silly IMNSHO. So I usually do this if I have to do maintenaince which
will completely bypass all init scripts:

LILO [you press 'Alt']

boot: [you type 'linux init=/bin/sh']

which will boot directly into 'bash' instead of running any init
scripts. Only your root partition will be mounted, and it will be
mounted read-only. From that point you can do something like this:

# mount -o remount,rw /

# vi /etc/fstab

and remove the failed partitions from the fstab so they won't be mounted
on startup. Unfortuntely, also dependent on distribution and
configuration, 'vi' may not be in your root partition. You may have to
mount some other partitions to find an editor to use. (And if you don't
use 'vi' just substitute whatever in place.)

*VERY IMPORTANT STEP HERE* - because the 'update' daemon may not be
running, buffers may not get flushed to disk before rebooting after
editing /etc/fstab, so before rebooting the box, do this:

# sync

to make sure buffers get flushed. Then do this:

# mount -o remount,ro /

to re-mount your root filesystem read-only so it won't need to get
fsck'd on boot. Then you can just hit the reset button.

Then you cross your fingers and hope you didn't miss a step which will
make you have to do it all over again and fix the bit you missed.

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#!/usr/bin/perl -w
$_='while(read+STDIN,$_,2048){$a=29;$b=73;$c=142;$t=255;@t=map
{$_%16or$t^=$c^=($m=(11,10,116,100,11,122,20,100)[$_/16%8])&110;
$t^=(72,@z=(64,72,$a^=12*($_%16-2?0:$m&17)),$b^=$_%64?12:0,@z)
[$_%8]}(16..271);if((@a=unx"C*",$_)[20]&48){$h=5;$_=unxb24,join
"",@b=map{xB8,unxb8,chr($_^$a[--$h+84])}@ARGV;s/...$/1$&/;$d=
unxV,xb25,$_;$e=256|(ord$b[4])<<9|ord$b[3];$d=$d>>8^($f=$t&($d
>>12^$d>>4^$d^$d/8))<<17,$e=$e>>8^($t&($g=($q=$e>>14&7^$e)^$q*
8^$q<<6))<<9,$_=$t[$_]^(($h>>=8)+=$f+(~$g&$t))for@a[128..$#a]}
print+x"C*",@a}';s/x/pack+/g;eval 

usage: qrpff 153 2 8 105 225 < /mnt/dvd/VOB_FILENAME \ | extract_mpeg2 | mpeg2dec -

http://www.eff.org/ http://www.opendvd.org/ http://www.cs.cmu.edu/~dst/DeCSS/Gallery/



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:11:31 EDT