Re: live media scan order
-----BEGIN PGP SIGNED MESSAGE-----
On Sun, Dec 07, 2008 at 04:50:54AM +0000, T o n g wrote:
> What's the default scan order to find the device that contains the "/
> live" directory?
> I hope it always search HD first, so that the copy found on the fast HD
> would be used instead of slow CD or USB.
Hm. Interesting you mention that. I stumbled upon this from another
angle. My use case was updating a system from a thumb drive. That means
booting it from the thumb drive and copying (dd) to the built-in media.
The first "surprise", (which shouldn't have been one) was that the system,
while booting (and taking its initrd) from the thumb drive, mounted the
image from the hdd. The second (which wasn't really one :-) whas what
happened when dd'ing the thumb drive to the harddisk (which is really an
1G flash drive masquerading as HD). It worked, but got ugly: systems
tend to get quite noisy when their root fs is being overwritten...
To put another (admittedly contrived) example: imagine you are taking
your "protable Linux" with you on a thumb drive (e.g. to an Internet
café). You want to pick up the image on the thumb drive, and not
whatever some malicious folks put on some random /live subdirectory on
the café's machine, right?
So what was my lesson from there? I think the sanest scan order would
be to try first the media which we just "booted from", meaning where we
got the initrd (and/or the kernel) from. But I have no clue how to find
out that (the kernel should know though). And still, this won't cover
all use cases.
I have the feeling that a boot parameter might help here, since
different users will have different needs.
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
-----END PGP SIGNATURE-----