LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   "Waiting for device sda1 to appear (timeout 1 min)" (https://www.linuxquestions.org/questions/linux-desktop-74/waiting-for-device-sda1-to-appear-timeout-1-min-835730/)

Rottiehound 10-01-2010 08:54 PM

"Waiting for device sda1 to appear (timeout 1 min)"
 
This afternoon, I tried to install Debian on a spare partition. The install didn't work, and I backed out of it. But that's not the problem.

Since that experiment, my main environment - Mandriva 2010 - has been very slow to load. While I was watching the circle go around on the splash screen (if you have Mandriva, you know what I mean), I hit [esc] and saw the following lines on the TTY display:

Quote:

Waiting for device sda1 to appear (timeout 1 min)
Waiting for device sda5 to appear (timeout 1 min)
sda5 is my swap partition; sda1 is where Mandriva lives.

It's not going to kill me to wait one extra minute after I turn on the computer, but this is new behavior; and I'd like some ideas on

a. why it happened, and
b. how to revert it to my previous near-instant startup.

I was very careful to ask Debian to only write its GRUB to the boot sector of its own partition (sda6). Mandriva is acting normally except for the change in startup.

Thanks.

{BBI}Nexus{BBI} 10-02-2010 02:15 PM

That message has nothing to do with your Debian install attempt. I have only ever had Mandriva on my system and I get the same message(s), I always have done quite a while now.

When a new kernel is installed you will get that behaviour where the circle just seems to be continuously going round but the system seems to be taking a while to load up. The reason for that delay is certain kernel modules are recompiled the next time you startup.

I don't know how you can revert back to your previous near instant startup, but I doubt waiting an extra minute will seriously impact on your productivity time. :)

Rottiehound 10-02-2010 05:54 PM

Hi Nexus, thanks for your reply.

This is Mandriva 2010.0, not the newer one, and they haven't sent me a new kernel in a long time. Updates in general have pretty much dried up. The "waiting for device" messages, and the delay, are new behaviors since the Debian debacle. Maybe the fact that the botched Debian install reformatted my swap drive is enough to make Mandriva "think" it needs to find something to recompile? Just guessing.

Unexpected new behavior always bugs me out to some extent. I can always use the extra minute to go make some more tea, as long as I know I'm not witnessing the birth of a showstopper. If you've been getting the swirlies for that long, I guess they're OK. :)

Thanks again,

'Hound

{BBI}Nexus{BBI} 10-02-2010 07:02 PM

Quote:

Originally Posted by Rottiehound (Post 4115933)
...they haven't sent me a new kernel in a long time.

That is unusual. Kernel updates are not normally dependent on which release version you are running. Are you not seeing any update notifications at all?
Quote:

Unexpected new behavior always bugs me out to some extent.
Unless you go through the list of what is going to be updated (or watch the updates being applied) there's often new features added that are not always noticeable straight away.

I always make it a point to hit esc at the bootsplash phase and familiarise myself with what happens at boot time. It makes it easier to spot when things are not quite right.

At least you were adventurous enough to investigate the lengthy 'swirly' :D

jiml8 10-02-2010 07:54 PM

The problem has to do with using UUID to identify disks and partitions.

I had the problem myself at one point and solved it. Sadly, I don't recall what I did, but it had to do with making sure the UUID seen for the partition was consistent throughout the system - including the entries in /dev, and in menu.lst, and in fstab.

Try running mkinitrd. Seems to me that is what fixed my problem.

mkinitrd -f /boot/initrd-2.6.31.12-desktop-1mnb.img 2.6.31.12-desktop-1mnb

with changes as appropriate to pick up your kernel correctly.

Kenhelm 10-02-2010 08:19 PM

I had a similar problem after remaking the swap space on Mandriva 2010.1. My swap space was given a new UUID which was different to the old UUID still present in some system files.

Code:

# On booting I received this message:
waiting for device sda1 to appear (timeout 1 min)
waiting for device sda5 to appear (timeout 1 min)
# Then after a 1 minute delay:
Could not find resume device (UUID=4a409051-c367-43a1-ab33-530ee64ba70a)
Could not resolve resume device (UUID=4a409051-c367-43a1-ab33-530ee64ba70a)

The cause seemed to be the 'resume=' entries in /boot/grub/menu.lst were still using the old UUID for the swap space.

Try comparing your swap space UUID with the ones in /etc/fstab and /boot/grub/menu.lst.
This gets the UUID directly from the swap space. It has to be run as root.
Code:

dd if=/dev/sda5 skip=1036 bs=1 count=16  2>/dev/null |
od -An -tx1 |
sed  's/ //g; s/\(........\)\(....\)\(....\)\(....\)/\1-\2-\3-\4-/'

1cf2e05c-549a-435e-aec2-74314bdc3bc0    # Typical output

# EDIT: A shorter way of doing it
od -j1036 -N16 -An -tx1  /dev/sda5 |
sed  's/ //g; s/\(........\)\(....\)\(....\)\(....\)/\1-\2-\3-\4-/'

1cf2e05c-549a-435e-aec2-74314bdc3bc0

I got rid of my 1 minute timeout by restoring the original UUID back to the swap space.
I thought that this would be a safer method than trying to find every place on the system where the UUID was being stored in order to make changes there.
(This dd command needs to be run as root and should only be used on swap spaces. If used on non-swap partitions it will corrupt them because their UUID is in a different position.)
Code:

UUID=4a409051-c367-43a1-ab33-530ee64ba70a
printf $(echo -n "${UUID//-}" | sed 's/../\\x&/g') |
dd of=/dev/sda5 seek=1036 bs=1 count=16 conv=notrunc

# UUID=    The original swap UUID about to be restored to swap
# echo -n "${UUID//-}"  Removes all '-' from the UUID.
# sed 's/../\\x&/g'    Modifies all hex pairs, e.g. '4a' to '\x4a'
# printf        Converts the resulting hex string to characters.
# dd  Overwrites the existing swap UUID with the original UUID.


{BBI}Nexus{BBI} 10-04-2010 10:19 PM

I've just done a fresh from scratch install of Mandriva and straight away I get the same messages as above for sda1 and sda5.

Rottiehound 10-05-2010 06:50 PM

Hi everybody,

Sorry; it took me a while to get back to this.

Kenhelm, I tried running your first command, and it returned something that looked like a UUID: that is, all the hyphens were in the right place and there were the right number of digits, but the digits were all zeros. I wouldn't be at all surprised if you diagnosed the cause of this. However, my install at least boots up, without the 'could not find resume device', &c. messages.

I saved what you wrote as a .sh script and ran that from the prompt. I also transcribed the whole thing and ran that from the prompt, with the same results.

I assume that if all those zeros were right, that would mean my swap space is corrupt or invisible, and Mandriva would be throwing me some big honkin' error messages.

Jim18, mkinitrd sounds like one of those carnivorous commands I shouldn't mess with :) but I should learn more about it, anyway. What's the worst that could happen if I run that command?

Nexus, I do check for updates via MCC from time to time. The other day it offered me some ATI drivers, for instance. But the kernel is still 2.6.31.13. I suspect that Mandriva isn't doing a lot to maintain 2010.0 these days. A couple of streaming media sites that I rely on did not work well with Mandriva 2010.1, and I could never get to the bottom of that (except to be reaffirmed in my belief that Adobe Flash is a big fat PITA), so I didn't move over to that version.

Thanks, everybody.

{BBI}Nexus{BBI} 10-05-2010 07:11 PM

Quote:

Originally Posted by Rottiehound (Post 4118830)
But the kernel is still 2.6.31.13. I suspect that Mandriva isn't doing a lot to maintain 2010.0 these days.

You shouldn't need to manually check. The current kernel version is 2.6.33.7. Maybe it's the repositories that you're using.

Quote:

mkinitrd sounds like one of those carnivorous commands I shouldn't mess with..
I tried that command. It didn't fix the timeout message and, the worst thing that happened was my system actually booted up quicker..! Thanks for that jiml8 :D

I'm with you 100% on the flash trashing :)

Kenhelm 10-05-2010 09:12 PM

Mandriva doesn't make a fuss if the swap space isn't working.
A quick way of checking the swap is to enter the 'free' command into a terminal.
The swap isn't working if there are only zeros on the 'Swap:' line.

Rottiehound 10-07-2010 08:56 AM

Quote:

Originally Posted by {BBI}Nexus{BBI} (Post 4118844)
You shouldn't need to manually check. The current kernel version is 2.6.33.7. Maybe it's the repositories that you're using.

Main, Main Updates, Contrib, Contrib Updates, Non-free, Non-free Updates. I have two Mandriva installations that I use regularly (one 32-bit, one 64-bit), and it's the same with both of them.

Quote:

Originally Posted by {BBI}Nexus{BBI} (Post 4118844)
I tried that command. It didn't fix the timeout message and, the worst thing that happened was my system actually booted up quicker..! Thanks for that jiml8 :D

I worked up the courage to try that, with very similar results to what you report. Pretty cool! I still get "Waiting for device sda1 to appear", which doesn't happen on my 32-bit machine, but the time is down to about 20 seconds. Anyway, a good excuse to learn about "mkinitrd".

Quote:

Originally Posted by Kenhelm
A quick way of checking the swap is to enter the 'free' command into a terminal.

Ken, thanks. That's yet another useful command to know about, cool! And yes, "Swap:"=goose eggs. So Mandriva lost track of the swap partition. Not the end of the world, and I have sure learned a lot from this episode.

Well, now I'm off to try to find out why Evolution is flaking out....


All times are GMT -5. The time now is 04:49 PM.