Skip to contentSkip to conversation

optional delay after partition detection at boot time

DISCUSSION subbie subbie 10 participants 17 messages Jun 12, 2005 – Jun 13, 2005

lore
Share & tools
lore
#0 lore raw

Hello,

I'm sure some of you have come across this annoying
issue, the kernel messages scroll way too fast for a human to be able to read them (let alone vgrep them).

I'm proposing two features;

1. a configurable (boot time, via kernel command
line) delay between each and every print -- kind of overkill, but may be useful sometimes.

2. a configurable (boot time, via kernel command
line) delay after partition detection, so that a humble system administrator would be able to actually find out which partition he should specify at boot
time in order to boot his system. This is especially
annoying on newer SATA systems where sometimes disks are detected as SCSI and sometimes as standard ATA (depending on BIOS settings), I'm sure though that it could be useful in a number of other cases.

Let the flames begin

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#1 lore raw
Quoted 2 lines

human to be able to read them (let alone vgrep them).

dmesg | grep

Quoted 1 line

Let the flames begin

/* Write it, it's just a mdelay() or sort of in printk(). */

Jan Engelhardt

#2 lore raw
In reply to subbie subbie
Quoted 12 lines · subbie subbie

Hello,

I'm sure some of you have come across this annoying
issue, the kernel messages scroll way too fast for a human to be able to read them (let alone vgrep them).

I'm proposing two features;

1. a configurable (boot time, via kernel command
line) delay between each and every print -- kind of overkill, but may be useful sometimes.

Quoted 9 lines

2. a configurable (boot time, via kernel command
line) delay after partition detection, so that a humble system administrator would be able to actually find out which partition he should specify at boot
time in order to boot his system. This is especially
annoying on newer SATA systems where sometimes disks are detected as SCSI and sometimes as standard ATA (depending on BIOS settings), I'm sure though that it could be useful in a number of other cases.

What's the problem with "cat /proc/partitions" or "dmesg" ? You seem to want to slow down *every* boot just to identify a partition you need to find *once*. This seems overkill.

willy

#3 lore raw

Willy,

This is for a one-time use option, when the the admin
is having a hard time finding the root partition, let alone the device NAME to boot the system ... proc is not even mounted at that point yet.

I can try booting ten times finding the correct scsi
device and partition number, but that's hairy especially in situations where kernel config and BIOS settings affect device detection.

This is not for slowing everything down, let's say
just until root is mounted from then on, as you say, dmesg and the system logs are available.

Quoted 32 lines · --- Willy Tarreau
Quoted 3 lines · subbie subbie

Hello,

I'm sure some of you have come across this

annoying

Quoted 1 line

issue, the kernel messages scroll way too fast for

a

Quoted 1 line

human to be able to read them (let alone vgrep

them).

Quoted 5 lines

I'm proposing two features;

1. a configurable (boot time, via kernel command
line) delay between each and every print -- kind

of

Quoted 5 lines

overkill, but may be useful sometimes.

2. a configurable (boot time, via kernel command
line) delay after partition detection, so that a
humble system administrator would be able to

actually

Quoted 2 lines

find out which partition he should specify at boot
time in order to boot his system. This is

especially

Quoted 1 line

annoying on newer SATA systems where sometimes

disks

Quoted 2 lines

are detected as SCSI and sometimes as standard ATA (depending on BIOS settings), I'm sure though that

it

Quoted 1 line

could be useful in a number of other cases.

Quoted 10 lines

What's the problem with "cat /proc/partitions" or "dmesg" ?
You seem to want to slow down *every* boot just to identify
a partition you need to find *once*. This seems overkill.

willy

__________________________________
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html

#4 lore raw
Quoted 6 lines · subbie subbie

Willy,

This is for a one-time use option, when the the admin
is having a hard time finding the root partition, let alone the device NAME to boot the system ... proc is not even mounted at that point yet.

There are two alternatives at boot :

- either you know the root device, and everything is OK (mount /proc; cat /proc/partitions)

- you don't know the root device, so the kernel will panic at boot because it cannot find the root device. In this case, you have the partition list still on the screen as it's among the latest things in the boot order. And if your kernel reboots upon panic, just boot it with panic=30 so get 30 seconds to read the partition table.

Quoted 4 lines

I can try booting ten times finding the correct scsi device and partition number, but that's hairy especially in situations where kernel config and BIOS settings affect device detection.

I too know that it's sometimes hard to read SCSI devices names on screen during the boot, but I'm not sure that introducing a delay will be more useful than the full pause provided by the panic. I may be wrong, though.

Quoted 3 lines

This is not for slowing everything down, let's say just until root is mounted from then on, as you say, dmesg and the system logs are available.

OK.

Regards,
willy

#5 lore raw
Quoted 8 lines

- you don't know the root device, so the kernel will panic at boot because it cannot find the root device. In this case, you have the partition list still on the screen as it's among the latest things in the boot order. And if your kernel reboots upon panic, just boot it with panic=30 so get 30 seconds to read the partition table.

And, I might add, boot with vga=6 to get a *BIG* screen, so you won't miss any messages.

Jan Engelhardt

Signature · 2 lines
| Gesellschaft fuer Wissenschaftliche Datenverarbeitung Goettingen,
| Am Fassberg, 37077 Goettingen, www.gwdg.de
#6 lore raw
In reply to Willy Tarreau
Quoted 7 lines · Willy Tarreau

- you don't know the root device, so the kernel will panic at boot because it cannot find the root device. In this case, you have the partition list still on the screen as it's among the latest things in the boot order. And if your kernel reboots upon panic, just boot it with panic=30 so get 30 seconds to read the partition table.

I have one machine inmy lab that turns out to need to boot from /dev/sdq1

trust me, that partition info has LONG since scrolled off the screen by the time it fails to mount and panics.

I ended up setting up a serial console to capture the boot to figure this machine out, but that's a pretty extreme measure to have to go to.

David Lang

P.S. I had to do this after grub failed to mount by label (my guess is that grub only looks at so many drives before giving up on finding the label) so don't tell me that I should just use labels and then I wouldn't have to worry about this type of thing

Signature · 2 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare
#7 lore raw
Quoted 10 lines · David Lang
Quoted 7 lines · Willy Tarreau

- you don't know the root device, so the kernel will panic at boot because it cannot find the root device. In this case, you have the partition list still on the screen as it's among the latest things in the boot order. And if your kernel reboots upon panic, just boot it with panic=30 so get 30 seconds to read the partition table.

Quoted 4 lines

I have one machine inmy lab that turns out to need to boot from /dev/sdq1

trust me, that partition info has LONG since scrolled off the screen by the time it fails to mount and panics.

Interesting. How many total partitions do you have ? I ask this because David Alan Gilbert proposed a patch to dump the partition list on the screen upon panic. Perhaps it's larger than the screen in you case ? If you have more than 25 partitions, to you think they can fit with 2 or 3 columns ?

Quoted 9 lines

I ended up setting up a serial console to capture the boot to figure this machine out, but that's a pretty extreme measure to have to go to.

David Lang

P.S. I had to do this after grub failed to mount by label (my guess is that grub only looks at so many drives before giving up on finding the label) so don't tell me that I should just use labels and then I wouldn't have to worry about this type of thing

I wouldn't tell you that, I *hate* labels. It causes lots of problems when you simply move some disks between machines.

Regards,
Willy

#8 lore raw
Quoted 5 lines

Interesting. How many total partitions do you have ? I ask this because David Alan Gilbert proposed a patch to dump the partition list on the screen upon panic. Perhaps it's larger than the screen in you case ? If you have more than 25 partitions, to you think they can fit with 2 or 3 columns ?

This machine has 16 SATA drives with 1 partition each plus a (hardware) mirrored pair of SCSI drives with 4 partions, so only 20 partitions total in my config. however there are people who use more drives then this.

David Lang

Signature · 2 lines
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
 -- C.A.R. Hoare
#9 lore raw
In reply to Willy Tarreau
Quoted 21 lines · Willy Tarreau
Quoted 10 lines · subbie subbie

I'm sure some of you have come across this annoying
issue, the kernel messages scroll way too fast for a human to be able to read them (let alone vgrep them).

I'm proposing two features;

1. a configurable (boot time, via kernel command
line) delay between each and every print -- kind of overkill, but may be useful sometimes.

Quoted 9 lines

2. a configurable (boot time, via kernel command
line) delay after partition detection, so that a humble system administrator would be able to actually find out which partition he should specify at boot
time in order to boot his system. This is especially
annoying on newer SATA systems where sometimes disks are detected as SCSI and sometimes as standard ATA (depending on BIOS settings), I'm sure though that it could be useful in a number of other cases.

Quoted 3 lines

What's the problem with "cat /proc/partitions" or "dmesg" ? You seem to want to slow down *every* boot just to identify a partition you need to find *once*. This seems overkill.

Or make the kernel print /proc/partitions when it is unable to mount root?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#10 lore raw
Quoted 1 line · * Geert Uytterhoeven ([email protected]) wrote:

Or make the kernel print /proc/partitions when it is unable to mount root?

I posted a patch in February to do this:

http://marc.theaimsgroup.com/?l=linux-kernel&m=110946077026065&w=2

Dave
--
-----Open up your eyes, open up your mind, open up your code -------

/ Dr. David Alan Gilbert    | Running GNU/Linux on Alpha,68K| Happy  \ 
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
#12 lore raw
Quoted 11 lines · * Willy Tarreau ([email protected]) wrote:
Quoted 7 lines · Dr. David Alan Gilbert
Quoted 1 line · * Geert Uytterhoeven ([email protected]) wrote:

Or make the kernel print /proc/partitions when it is unable to mount root?

I posted a patch in February to do this:

http://marc.theaimsgroup.com/?l=linux-kernel&m=110946077026065&w=2

This is even better ! I will probably backport it to 2.4 to merge in my kernels ;-)

That would be nice (I'd like to see it in 2.6); I wrote it for two reasons:
1) Because often the info you need has already scrolled off and because of the panic you can't scroll back.

2) When talking to users on help channels the only thing they can normally tell you is the last 'failed to mount root' line and don't really no what to look back for, by having a few line summary you can more easily get someone to type out.

1) could be cured by not actually panic'ing.

Dave
--
-----Open up your eyes, open up your mind, open up your code -------

/ Dr. David Alan Gilbert    | Running GNU/Linux on Alpha,68K| Happy  \ 
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
#13 lore raw
Quoted 2 lines · Dr. David Alan Gilbert

1) could be cured by not actually panic'ing.

Actually one thing I always wanted was to make sysrq still work after panic. Then you could add a key to page through the dmesg there too and the problem would be solved.

It would be extremly useful to reset remote servers when panic=timeout is not set, but something went wrong with mounting /.

-Andi

#14 lore raw
Quoted 7 lines · Andi Kleen
Quoted 2 lines · Dr. David Alan Gilbert

1) could be cured by not actually panic'ing.

Actually one thing I always wanted was to make sysrq still work after panic. Then you could add a key to page through the dmesg there too and the problem would be solved.

Well, that's why I wrote kmsgdump several years ago :-) You could even print the messages on a parallel printer or save them to a floppy disk.

Quoted 2 lines

It would be extremly useful to reset remote servers when panic=timeout is not set, but something went wrong with mounting /.

I think that more generally, we should reset if there's no panic=timeout, because the reasons for a panic are multiple and in case of remote servers, it's always a nightmare to know that may be you will lose access after one risky operation.

Willy

#15 lore raw
In reply to Willy Tarreau
Quoted 9 lines · Willy Tarreau
Quoted 8 lines · subbie subbie

Hello,

I'm sure some of you have come across this annoying
issue, the kernel messages scroll way too fast for a human to be able to read them (let alone vgrep them).

I'm proposing two features;

Quoted 7 lines
Quoted 3 lines

1. a configurable (boot time, via kernel command
line) delay between each and every print -- kind of overkill, but may be useful sometimes.

What's the problem with "cat /proc/partitions" or "dmesg" ? You seem to want to slow down *every* boot just to identify a partition you need to find *once*. This seems overkill.

There's been more than once that something's been borked up such that I can't *GET* to where I can run a cat command or dmesg - and it's not always a partition problem.

Personally, what I could go for is control-Q/S support for printk output :)

#16 lore raw
In reply to subbie subbie
Quoted 6 lines · subbie subbie

Hello,

I'm sure some of you have come across this annoying
issue, the kernel messages scroll way too fast for a human to be able to read them (let alone vgrep them).

If you need to pause the messages during boot, just press the Scroll Lock key (or is it the Pause key, can't recall, but one of them works).

Signature · 3 lines
Jesper Juhl <[email protected]>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html