[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: The order of my SATA and PATA are switching all the time



On Tue, 07 May 2013 23:28:47 -0400 (EDT), Tong wrote:
> 
> On Tue, 07 May 2013 07:55:24 -0400, Stephen Powell wrote:
>> 
>> This problem, and its solution, are discussed at length on my LILO web
>> page, starting with the discussion of the "boot" configuration file
>> record.
>> 
>>    http://users.wowway.com/~zlinuxman/lilo.htm
> 
> Indeed!
> 
> "The solution to this problem is to use a udev-created symbolic link.  In 
> the example configuration file above, /dev/disk/by-id/ata-IBM-
> DBCA-203240_HP0HPL43952 is a udev-created symbolic link to the MBR of the 
> (normal) boot drive, regardless of which driver is used for IDE hard disks 
> and regardless of how many disk drives are in the system, the order in 
> which they are discovered, or what the boot device is.  "
> 
> That's a good suggestion, but I noticed that the example you gave has:
> 
>    boot=/dev/disk/by-id/ata-IBM-DBCA-203240_HP0HPL43952
>    root="UUID=04db5929-51e6-424a-ac5b-a592b96b9d04"
> 
> I.e., they are not using the same thing.

Of course not!  The "boot" configuration file record points to the Master
Boot Record in the above example.  The "root" configuration file record
points to a particular partition on the hard disk which has an ext2/ext3
file system on it.  They are not the same.  They are not supposed to be
the same.  I think you have some conceptual errors in your mind that you
need to resolve.
> 
> As said before, it is not that I 
> can't boot, I can always boot just fine, but half of the time the boot 
> process will drop to "(initramfs)" PANIC mode. I.e., it is always the 
> "root=" boot option that give me the trouble, yet, I don't like using UUID, 
> because, just as you said: 
> 
> "Warning: reformatting a partition normally changes the uuid, unless the 
> existing uuid is explicitly specified as an option when formatting.  Thus, 
> commands such as mkfs (and its derivatives) and mkswap will normally 
> change the uuid, which in turn will change the udev-created symbolic link 
> in /dev/disk/by-uuid, which in turn may necessitate changes to /etc/
> lilo.conf. "
> 
> Can I use something like root="ID=ata-IBM-DBCA-203240_HP0HPL43952"? I 
> remember nothing worked well, so I reverted to the (now troublesome) 
> "safe" /dev/sdXn.

/dev/sdXn is *not* safe.  That's the whole point.  If your boot loader is LILO,
the only "safe" root file system specifications are one of these two forms:

   root="UUID=..."
   root="LABEL=..."

You must refer to the root file system by its uuid or by its disk label, if
there is one.  Yes, reformatting a partition will normally change the uuid
and label, unless the old uuid and label are explicitly specified when
formatting.  But that's under your control.  And this is something that does
not change from one boot to the next.  Device assignments can.  Make sure
that you use this technique in your boot loader configuration file, /etc/fstab,
and /etc/initramfs-tools/conf.d/resume.  (/etc/initramfs-tools/conf.d/resume
is going to point to a swap partition.)  If you have to change
/etc/initramfs-tools/conf.d/resume, you must rebuild your initial RAM file
system afterwards, since this file is included in the initial RAM file system.

   update-initramfs -uk $(uname -r)

And obviously, if you change your boot loader configuration file, such as
/etc/lilo.conf, you must rerun your boot loader installer afterwards.

   lilo
 
-- 
  .''`.     Stephen Powell    
 : :'  :
 `. `'`
   `-


Reply to: