On 10/19/2015 07:07 PM, Karl E. Jorgensen wrote:
> Hi
> 
> On Mon, 2015-10-19 at 18:24 +0300, Ivan Boro wrote:
>> Looks like subj.
>> Have a KVM machine with jessie assembled via debootstrap. Fstab states
>>
>> /dev/vda2       /       ext4    rw      0       0
>>
>> The partition labeled vda2 is listed in grub.cfg as the root partition
>> by its uuid.(via update-grub)
>>
>> Added a disk to have swap on it. Booted normally, despite the fact, that
>> the new swap-disk was automatically labeled as vda and the disk with
>> root is as vdb:
>>
>> # mount | grep ' / '
>> /dev/vdb2 on / type ext4 (rw,relatime,data=ordered)
>>
>> No errors or warnings in dmesg.
>>
>> So, systemd mounted root partition, whitout looking into fstab.
>>
>> I don't have much experience in systemd, and now wonder how this "smart"
>> mount works.
> 
> Well - I doubt this is systemd specific.
> 
> /etc/fstab is in the root file system.  Thus, the system can only
> examine /etc/fstab _after_ the root file system has been mounted...
> 
> Instead you may want to examine the kernel command line (e.g. in grub
> or /proc/cmdline) - it should have "root=xxxx" in it. Nowadays that is
> often specified via a UUID - and the UUID stays the same if if you move
> disks about.
> 
> Hope this helps
> 

Yes. Fun thing, I've accidentally put /dev/vda1 to my host's
filesystem's fstab, and the host system runs init as pid=0.
Everything boots normally. Now I doubt, is the root entry present in the
fstab file generated automatically during system setup.

Reply via email to