LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Fedora installed on USB HDD doesn't start when the internal HDD is connected (https://www.linuxquestions.org/questions/linux-newbie-8/fedora-installed-on-usb-hdd-doesnt-start-when-the-internal-hdd-is-connected-4175459702/)

DavidBrenner 04-26-2013 02:49 PM

Fedora installed on USB HDD doesn't start when the internal HDD is connected
 
Hi.
Sorry for my bad english...
I'm not a professional but I'm also not a total newbie. Somewhere in between :D

OS: Fedora 18 686, KDE 4.10.2, kernel 3.8.8-202.

I have installed Fedora on my internal HDD and it works great. Well, almost...
But the (real) problem is when I tried to install it also to my USB HDD. I used
this "tutorial": http://www.linuxquestions.org/questi...ve-4175427930/

I disconnected the internal HDD and I used a USB flash drive to install.
I spent several hours (hard work) customizing the Fedora installation.
I'm using grub4dos to start it:

Code:

title Start installed Fedora first HDD
root (hd0,1)
kernel /boot/vmlinuz-3.8.8-202.fc18.i686 root=/dev/sda2 rd.md=0 rd.lvm=0
rd.dm=0 rd.luks=0 rhgb quiet vga=791
initrd /boot/initramfs-3.8.8-202.fc18.i686.img

After that I reconnected the internal HDD and tried to boot again from the USB
HDD. It didn't work. I don't think it's because of the HDD order (0/1 a/b)
because it wouldn't of started at all but I keep an open mind...
The kernel starts to load, I see a lot of green [ OK ] with modules loading. At
some point I see a red [ Failed ] to something "Waiting Plymouth boot to quit", a
couple of green [ OK ] again and it's not loading anymore. The last one is
"Started graphical interface".
Btw, the [ Failed ] with "Waiting Plymouth boot to quit" I see it also when I try to boot on
Fedora live with the USB flash and the internal HDD connected but it's starting ok in the end. On my installation it doesn't.
It could be that it's not recognizing the internal HDD, it could be because of the grub2
from the internal hdd, it could be because it's reading something from the
internal HDD installation or it could be the grub4dos menu entry used to load
the USB HDD installation...
I don't know...
Oh, one of the differences between these 2 installations is that on internal HDD
I installed the NVidia driver and on the USB HDD I kept the Nouveau driver.

What can I do?
Thank you for any suggestion.
I searched before asking but couldn't find something useful.

Regards, David

Later edit: I found some sort of solution - to use "root=UUID=5831c69e-e9fd-4f61-812a-ebb9207c1155" instead of "root=/dev/sda2" but it's not working 100%.
I'm thinking that the problem may be that Fedora was installed on sda and, when the internal HDD is connected, the USB HDD becomes sdb.
In theory it shouldn't be problems but they are (slow boot, it's reading incorrect configuration files and so on).
My (updated) question: is there a way (a kernel parameter maybe) to "tell" Fedora that the USB HDD should be seen ALWAYS as sda (or at least on most computers)?
Thank you.

Sigg3.net 04-29-2013 12:37 PM

Well, it is possible to format the partitions with LABELS set, and ask GRUB2 to ignore UUID and use root=LABEL=my_label to boot a certain label. See for instance http://ubuntuforums.org/showthread.php?t=1530532&page=2. Not sure whether it is stable.

UUID is your best best AFAIK. It references particular partitions. So while "UUID=5831c69e-e9fd-4f61-812a-ebb9207c1155" works for root, use dbus-uuidgen to get the UUID for /boot and change /boot/ references to that UUID..?

The message "Waiting for Plymouth boot screen to quit" is related to graphics drivers (nvidia for instance) and X. What is immediately before that line in dmesg? Sometimes it is the next-to-last line in boot that hangs..

guyonearth 04-29-2013 01:33 PM

The foolproof way to do this is to install each distro independently of each other on their own hard drive, and install grub to the mbr of THAT drive. Use your bios to choose boot order. Most all computers have a key you can press on boot to choose which drive you want to boot. I've used this method for years, it's much easier than trying to set up multiboots and juggling partitions. Linux doesn't care which drive it's on, and this should not affect how it works. Buy installing Linux on two drives and letting the system think they're both sda, you're asking for trouble.

273 04-29-2013 01:46 PM

When you look in /etc/fstab for the USB install does it use the UUID also? If not then adding it there may solve your problem. That said I think most distros use UUID in fstab nowadays.

DavidBrenner 04-29-2013 09:33 PM

Thank you for the answers.
With the UUID now it's loading KDE (slow but it's loading).

@Sigg3.net
You're right, UUID is better than labels.
I used dbus-uuidgen and it showed "7c705303552339b01f39521e517f2890". Where you say I should change the /boot reference..?

@guyonearth
I installed them independently and on their own HDD. For the internal HDD I used Grub 2 installed in its MBR, for the USB HDD I used Grub4dos installed in its MBR. And I use Bios (or F12 key) to choose which drive to boot.

@273
/etc/fstab:

Code:

#
# /etc/fstab
# Created by anaconda on Fri Apr 26 21:09:15 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=5831c69e-e9fd-4f61-812a-ebb9207c1155 /                      ext4    defaults        1 1
UUID=36950eef-d509-42e9-a6da-bf6457c1b034 swap                    swap    defaults        0 0
UUID=2CAA-9BF8 /mnt/Boot vfat        rw,auto,users,umask=003,gid=46,uid=1000 0 0
UUID=01CE428C3D3B1560 /mnt/Storage ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000    0  0

The last 2 were added by me recently (2 partitions from the USB HDD).

Madhu Desai 04-29-2013 11:51 PM

@DavidBrenner

you could use blkid to get UUID.
Code:

$ blkid
/dev/mapper/vg0-var: UUID="eaf241ab-b626-488c-abd2-0db8a6dc42a0" TYPE="ext4"
/dev/sda1: UUID="040ca6f4-86fb-4170-aea3-e98359c5b89b" TYPE="ext4"
/dev/sda2: UUID="8cN0qn-TUOK-USUp-eVth-MNIY-LVwq-f5Y8GT" TYPE="LVM2_member"
/dev/mapper/vg0-swap: UUID="2c6a34b5-43c4-4731-b867-3e59234cebcd" TYPE="swap"
/dev/mapper/vg0-root: UUID="b197906d-c8ff-472f-b27b-d3e02a64cdba" TYPE="ext4"
/dev/mapper/vg0-home: UUID="77419f95-5392-4636-bd84-121d15ef3738" TYPE="ext4"
/dev/sda3: UUID="35189849-79bc-4bcb-8c56-c8367febf6de" TYPE="crypto_LUKS"
/dev/sda4: LABEL="DC" UUID="b54971b9-7bdf-4b79-9aac-09921c7572bb" TYPE="ext4"
/dev/mapper/vg0-katau: UUID="37296610-c7aa-438e-86dc-7a2727abaf88" TYPE="crypto_LUKS"
/dev/sdb1: LABEL="SAMSUNG" UUID="A78D-9D61" TYPE="vfat"


DavidBrenner 04-30-2013 12:25 AM

Thank you, it's a good idea. I already use it to get the UUID of the last 2 partitions added in fstab (previous post).

When I start only with the USB HDD:

Code:

/dev/sda1: LABEL="BOOT" UUID="2CAA-9BF8" TYPE="vfat"
/dev/sda2: LABEL="system" UUID="5831c69e-e9fd-4f61-812a-ebb9207c1155" TYPE="ext4"
/dev/sda4: LABEL="Storage" UUID="01CE428C3D3B1560" TYPE="ntfs"
/dev/sda5: UUID="36950eef-d509-42e9-a6da-bf6457c1b034" TYPE="swap"


But when I connect also the internal HDD:

Code:

/dev/sda1: LABEL="System XP 32bit" UUID="1CAC3ADFAC3AB35E" TYPE="ntfs"
/dev/sda2: LABEL="system" UUID="3ee1e691-faba-4e0f-90ed-dfcf08ee332d" TYPE="ext4"
/dev/sda5: UUID="3a28bd3e-a229-4048-9443-698dff9019c1" TYPE="swap"
/dev/sda6: LABEL="Stocare" UUID="01CDD9E348D3B510" TYPE="ntfs"
/dev/sdb1: LABEL="BOOT" UUID="2CAA-9BF8" TYPE="vfat"
/dev/sdb2: LABEL="system" UUID="5831c69e-e9fd-4f61-812a-ebb9207c1155" TYPE="ext4"
/dev/sdb4: LABEL="Storage" UUID="01CE428C3D3B1560" TYPE="ntfs"
/dev/sdb5: UUID="36950eef-d509-42e9-a6da-bf6457c1b034" TYPE="swap"


Madhu Desai 04-30-2013 03:06 AM

@DavidBrenner

Code:

/dev/sda1: LABEL="BOOT" UUID="2CAA-9BF8" TYPE="vfat"
According to Redhat official guide, you can only use ext2, ext3 or ext4 for /boot partition. i guess same applies for fedora also. you have /boot as vfat partition. are you sure its correct?

Recommended Partitioning Scheme

DavidBrenner 04-30-2013 04:24 AM

From that link:

Quote:

The partition mounted on /boot/ contains the operating system kernel (which allows your system to boot Red Hat Enterprise Linux), along with files used during the bootstrap process. For most users, a 250 MB boot partition is sufficient.
/dev/sda1 (BOOT) does not contain any Linux files, including the kernel. The kernel is in /dev/sda2.
It is just a Fat32 partition with many useful tools. It was not designed especially for RedHat/Fedora boot.
Fedora is started with a grub4dos menu (the entry from my first post). It is very similar with the way Grub 2 loads Fedora from the internal HDD.
For some time I used the same technique on the internal HDD without any problems.
So it doesn't seem that the problem could be from this...

273 04-30-2013 04:29 AM

What problem[s] are you still experiencing?

DavidBrenner 04-30-2013 06:57 AM

1. Slow boot. I know that the USB HDD is slower than the internal HDD, but still...
For example I see that [ Failed ] to something "start Waiting Plymouth boot to quit"twice and it waits a long time in that "area".
2. Sometimes it seems that it loads configuration files from the internal HDD. For example I update Fedora on the internal HDD, I reboot on the USB HDD to install the same updates but Apper says "no updates" no matter how many times I try...
I power down the computer, disconnect the internal HDD, power up and boot with USB HDD. This time it shows the updates in Apper...

And sorry for not answering faster but I had a 2+ hours power outage in my area...

273 04-30-2013 07:26 AM

What does "mount" return when you boot from the USB and the internal drive is connected and when it isn't? Also, is the USB install noticeably slower when the internal drive is connected?

DavidBrenner 04-30-2013 08:28 AM

I think I found a solution with the slow boot: it seems that it's a KDE bug in Fedora.
I removed livesys-late.service from After= from /lib/systemd/system/kdm.service.
Now it starts faster and there isn't much of a difference between with or without internal HDD (systemd-analyze shows only 6 sec difference).
I also disabled iscsi.service and iscsid.service.
Now, after the kernel is loaded, boots in about 65 sec which is acceptable.

On the other hand, mount doesn't show that a partition from the internal HDD is mounted, only that sda becomes sdb.

mount (without internal HDD):
Code:

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=1666544k,nr_inodes=207622,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
/dev/sda2 on / type ext4 (rw,relatime,seclabel,data=ordered)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
tmpfs on /tmp type tmpfs (rw,seclabel)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /mnt/Boot type vfat (rw,nosuid,nodev,noexec,relatime,uid=1000,gid=46,fmask=0003,dmask=0003,allow_utime=0020,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
/dev/sda4 on /mnt/Storage type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)

mount (with internal HDD):
Code:

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=1666544k,nr_inodes=207622,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
/dev/sdb2 on / type ext4 (rw,relatime,seclabel,data=ordered)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
tmpfs on /tmp type tmpfs (rw,seclabel)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/sdb1 on /mnt/Boot type vfat (rw,nosuid,nodev,noexec,relatime,uid=1000,gid=46,fmask=0003,dmask=0003,allow_utime=0020,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sdb4 on /mnt/Storage type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)

Anyway, in the last few hours I have another problem: when I try to shut down/reboot the installation from the USB HDD (with the internal HDD connected) it shows me this error:
http://www.imagebam.com/image/aab845251787907

273 04-30-2013 08:34 AM

I don't see anything there that suggests that the internal drive is being mounted at all. You can confirm that the correct drive is being mounted as / by checking:
Code:

ls -l /dev/disk/by-uuid/
Making sure that the UUID you're suing for the USB root is mounted as /.
I think, perhaps, the problems are just due to the USB install itself rather than any interaction with another install.

DavidBrenner 04-30-2013 09:40 AM

Quote:

Originally Posted by 273 (Post 4941869)
I don't see anything there that suggests that the internal drive is being mounted at all. You can confirm that the correct drive is being mounted as / by checking:
Code:

ls -l /dev/disk/by-uuid/
Making sure that the UUID you're suing for the USB root is mounted as /.

Code:

ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx. 1 root root 10 Apr 30  2013 01CDD9E348D3B510 -> ../../sda6
lrwxrwxrwx. 1 root root 10 Apr 30  2013 01CE428C3D3B1560 -> ../../sdb4
lrwxrwxrwx. 1 root root 10 Apr 30  2013 1CAC3ADFAC3AB35E -> ../../sda1
lrwxrwxrwx. 1 root root 10 Apr 30  2013 2CAA-9BF8 -> ../../sdb1
lrwxrwxrwx. 1 root root 10 Apr 30  2013 36950eef-d509-42e9-a6da-bf6457c1b034 -> ../../sdb5
lrwxrwxrwx. 1 root root 10 Apr 30  2013 3a28bd3e-a229-4048-9443-698dff9019c1 -> ../../sda5
lrwxrwxrwx. 1 root root 10 Apr 30  2013 3ee1e691-faba-4e0f-90ed-dfcf08ee332d -> ../../sda2
lrwxrwxrwx. 1 root root 10 Apr 30  2013 5831c69e-e9fd-4f61-812a-ebb9207c1155 -> ../../sdb2

Quote:

Originally Posted by 273 (Post 4941869)
I think, perhaps, the problems are just due to the USB install itself rather than any interaction with another install.

Yes, maybe, but it's strange that it booted slow only when the internal HDD was connected. Anyway, I'm glad that's fixed now...


All times are GMT -5. The time now is 10:05 PM.