Mailinglist Archive: opensuse-factory (528 mails)
| < Previous | Next > |
Re: [opensuse-factory] RFC: swapfile during installation
- From: Randall R Schulz <rschulz@xxxxxxxxx>
- Date: Mon, 21 May 2007 08:55:15 -0700
- Message-id: <200705210855.15505.rschulz@xxxxxxxxx>
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.
Speaking of failure, you might want to replace the semicolons with
double ampersands, so the later commands only execute if the earlier
ones succeed.
By the way, why attempt to unmount /mnt? Since there's now an open file
there, is it not guaranteed to fail?
> ...
>
> Steffen
Randall Schulz
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx
> ...
>
> 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.
Speaking of failure, you might want to replace the semicolons with
double ampersands, so the later commands only execute if the earlier
ones succeed.
By the way, why attempt to unmount /mnt? Since there's now an open file
there, is it not guaranteed to fail?
> ...
>
> Steffen
Randall Schulz
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-factory+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-factory+help@xxxxxxxxxxxx
| < Previous | Next > |