lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4852ECAC.9060106@s5r6.in-berlin.de>
Date:	Fri, 13 Jun 2008 23:54:52 +0200
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Shawn Jin <shawnxjin@...il.com>
CC:	Tomasz Chmielewski <mangoo@...g.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: Force a usb drive to be /dev/sda?

Shawn Jin wrote:
>>> The bootloader I'm using is LILO. So I have to specify the boot device
>>> and the root device in lilo.conf. For example, boot=/dev/sda,
>>> root=/dev/sda1. I'm not sure how mounting filesystem by UUID or by
>>> label can help. A little bit elaboration will be more helpful.
>> Ah I forgot that...  Looks like this requires an initrd too, though without
>> special scripts of your own.
> 
> Forgive my slowness to understand your suggestion. The kernel I built
> has all the sata drivers, usb drivers, and scsi layer built in. So
> during the kernel bootup before the root is mounted, all drives (sata
> and usb) are scanned and detected. How does an initrd plus mounting
> the root filesystem by UUID or label help here? Or how can I set the
> "root" in the lilo.conf?

I haven't used lilo for a while, nor initrd, hence I can't give you a 
detailed recipe.  You specify the initrd as device with root filesystem 
to the boot manager.  In the initrd you have e.g. an fstab by which you 
mount the later root filesystem based on the filesystem ID.  Then the 
initrd chroots to that fs.

> If an initrd is used, I would rather go with option 3. That is, build
> SATA drivers as loadable modules and load them in the initrd. Then
> before initrd loads sata drivers, there is only one usb drive as
> /dev/sda.

In that case you don't need an initrd at all.

> Also I'm lost by this comment: "though without special scripts of your
> own". Could you explain it in another way? Were you saying that I need
> my own special scripts to mount the root filesystem by UUID or label?
> I think this is quite obvious since I need to build an initrd, which
> is always customized. :-P

A little bit more would be necessary if the initrd had to pick up device 
IDs.  If you just use the initrd to load some modules and to mount the 
subsequent root fs, it won't really look different from most distributor 
initrds AFAICS.
-- 
Stefan Richter
-=====-==--- -==- -==-=
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ