LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   1 minute boot delay 'waiting for device sda5 to appear' (https://www.linuxquestions.org/questions/mandriva-30/1-minute-boot-delay-waiting-for-device-sda5-to-appear-807974/)

jaymz69 05-15-2010 03:52 AM

1 minute boot delay 'waiting for device sda5 to appear'
 
I noticed it when a clean install was done on one machine in a lab..

they all have the same config and use mandriva 2010 but one of them borke and a clean install of the system was performed after which I noticed a considerable boot time difference between this machine and the others [ie others being much slower]...

during boot of the slower machines I looked at the command line and it showed the info which I put in the subject 'waiting for device sda5 to appear for one minute' which obviously causes the delay -- how to repair this?

when I looked at the disk management it turns out it has a main partition 'sda' and 2 extended partitions 'sda5' and 'sda6' ['sda5' working as the swap partition]

whats wrong and how can I improve the situation to make the machines boot faster? [in layman terms please :)]

theYinYeti 05-15-2010 04:22 AM

This is probably a problem with your system's initrd, which became out of sync with your partitions, probably because a partition was formatted anew. You just have to re-create the initrd file (as root). Example (as root):
Code:

# uname -r
2.6.31.13-desktop-1mnb          (this gives the kernel version you're using)
# mkinitrd /boot/initrd-2.6.31.13-desktop-1mnb.img 2.6.31.13-desktop-1mnb

Of course you have to use (twice) the same version in the mkinitrd line, as uname told you.

Yves.

jaymz69 05-15-2010 04:39 AM

are you sure this is the case? Im not questioning Ur judgement only wantin to be safe

Im also askin because when [in command line] I looked at the line just after 'waiting for device sda5 to appear' it said 'could not find resume device' [and uuid of sda5 followed in brackets] and then 'could not resolve resume device' [and again uuid of sda5 followed in brackets]

when I did some goodle search for these errors most pages I found talked about a direct problem with swap partition being badly formatted -- so after this additional info are you sure I should do as Uve written above?

jaymz69 05-15-2010 04:46 AM

I did as Yves suggested -- no positive results :(

barjac 05-17-2010 04:43 PM

You need to check that the UUID of your swap partition is correct in fstab, menu.lst and initrd:-
Run this script as root to quickly check:-
Code:

#!/bin/bash
# swap_chk.sh
echo "Swap partitions on system (blkid) :-"
blkid |grep swap|cut -d'"' -f 2
echo "Swaps listed in fstab :-"
sed -e '/^#/d' /etc/fstab | grep swap | cut -d= -f2 | cut -d" " -f1
echo "menu.lst resumes:-"
sed -e '/^#/d' /boot/grub/menu.lst | grep resume | cut -d"=" -f6 | cut -d" " -f1
echo "Root and swap UUIDs as expected by initrd :-"
lsinitrd /boot/initrd.img | grep -m2 waitdev |cut -d" " -f3 | cut -d= -f2

Post back the terminal output if you need help to correct anything.
EDIT You can also run this combined check and repair tool for this issue - again as root. No guarantees at all, but it has been tested in Mandriva 2010.0.
http://barjac.pastebin.com/raw.php?i=f2d0a3e3a

jaymz69 05-18-2010 01:07 PM

thank U -- it looks nice

but I was impatient and re-installed the system on all the machines so I wont be able to give it a try at this moment but if I notice the problem again Ill be sure to try both tips [however when I compared the uuids -- only with my own eyes and a pencil though -- in all these files U mention they looked identical so Im not sure the problem was there]

I noticed differences in partition setup between the machine which started quickly and the ones which had the 1 minute delay -- the ones with the delay were strangely partitioned [by the company which provided comps for the lab] into 3 different file systems: windows, linux swap and linux native
however the one which started smoothly had only ext4 and linux swap so I concluded these multiple file systems had to be the cause of the problem and erased formatted and installed everything from scratch -- so far all the machines have been runnin smoothly

thanx again for replying

barjac 05-19-2010 02:44 AM

It may have been a different issue then. The usual cause of this problem is when someone installs another distribution on the same machine, which re-formats the common swap partition, changing it's UUID in the process.
Glad you sorted it anyhow :-)

GlennsPref 06-02-2010 12:16 AM

Thank you.

fral 11-14-2010 10:48 PM

Quote:

Originally Posted by theYinYeti (Post 3969298)
This is probably a problem with your system's initrd, which became out of sync with your partitions, probably because a partition was formatted anew. You just have to re-create the initrd file (as root). Example (as root):
Code:

# uname -r
2.6.31.13-desktop-1mnb          (this gives the kernel version you're using)
# mkinitrd /boot/initrd-2.6.31.13-desktop-1mnb.img 2.6.31.13-desktop-1mnb

Of course you have to use (twice) the same version in the mkinitrd line, as uname told you.

Yves.

My english is awful so, excuse any mispelling.

Hello, i know this is a already old thread but it resulted really helpful to me so i just wanted to thanks to all and to post the differences in my case in case it results useful to somebody else.

What happened to me was that i was having overlapping problems between my swap and my /home as a product of using the same partitions in my old distro to install my PCLOS, after recreate and reformat my swap i started to have the same delay problems in my boot time as described by the OP. When i did the changes to the swap partition, the system re-numerated my partitions so i was sure the problem was in the uuids but didn't know how to fix it till now.

In my case lsinitrd told me that the partitions with wrong uuid in initrd (according to the fstab) was the / and the swap, so the solution was as simple as re-create my initrd as stated by theYinYeti, and now i have back my normal boot speed (crazy fast normal PCLOS boot speed :) ), so thank you very much to all for this thread.


Greetings and i'll be roaming a lot this forum :)

robertobribeiro 04-20-2011 06:21 PM

I was just facing the same problem reported by jaymz69 on my laptop and solved with barjac's scripts (swap_chk.sh and swapfix.sh)

Thank you! =)

Code:

cat /etc/issue
Mandriva Linux release 2010.2 (Official) for x86_64
Kernel 2.6.33.7-desktop-2mnb on a 4-processor x86_64 / \l



All times are GMT -5. The time now is 03:03 AM.