On Mon, 21 May 2007, Randall R Schulz wrote:

> On Monday 21 May 2007 08:37, Steffen Winterfeldt wrote:
> > ...
> >
> > Really cool users can show their advancedness by booting with (for
> > example):
> >
> > insmod=vfat exec="mount /dev/sda1 /mnt ; dd if=/dev/zero of=/mnt/foo
> > bs=1G count=1 ; mkswap /mnt/foo ; swapon /mnt/foo ;
> > /usr/local/bin/umount -l /mnt"
> >
> > which does exactly what you want. :-)
> 
> That's definitely cool, but I'd turn down the dd buffer size and 
> compensate by increasing the record count. If a buffer of the specified 
> size (bs= argument) cannot be allocated by dd, it will fail. (It's not 
> going to affect the speed unless the buffer size is ridiculously small, 
> since the whole thing is utterly I/O-bound.) Given that no swap is 
> available at the time, asking for a gigabyte would mean that many 
> users' systems would not be able to accommodate this request.

Granted. 'bs=1M count=1024' would be better.

> Speaking of failure, you might want to replace the semicolons with 
> double ampersands, so the later commands only execute if the earlier 
> ones succeed.

Bah! My commmands never fail. :-)

> By the way, why attempt to unmount /mnt? Since there's now an open file 
> there, is it not guaranteed to fail?

You need to get rid of it, because (a) yast uses /mnt and (b) yast might
want to mount the partition itself. umount will not fail as '-l' makes a
'lazy' umount (unmounts no matter what).


Steffen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to