/srv/irclogs.ubuntu.com/2006/01/15/#ubuntu-boot.txt

=== JanC [n=janc@lugwv/member/JanC] has joined #ubuntu-boot
=== makx [n=max@213.239.196.228] has joined #ubuntu-boot
=== Keybuk [n=scott@descent.netsplit.com] has joined #ubuntu-boot
=== fabbione [i=fabbione@gordian.fabbione.net] has joined #ubuntu-boot
=== fabbione [i=fabbione@gordian.fabbione.net] has joined #ubuntu-boot
=== fabbione [i=fabbione@gordian.fabbione.net] has joined #ubuntu-boot
fabbionebah09:08
fabbioneKeybuk: the patch I did for grub-installer fixes only half of the problems :/09:08
fabbionei just figured that there is another section that needs love09:08
Keybukoh?09:08
fabbioneand it's WAYYYYYY complicate to touch09:08
fabbionethe first patch fix the writing of the MBR09:09
fabbioneand it works09:09
fabbionethe issue is now all the references to groot/root/kopt09:09
fabbionethat involves changing grub as well09:10
fabbioneor update-grub09:10
Keybukcute09:11
=== Keybuk backs away smiling
Keybuk:D09:11
fabbioneno09:11
fabbionepainful09:11
fabbionegrub is the shit09:38
fabbioneit has the same code duplicated 3 times!09:38
fabbioneKeybuk: you still around?09:47
fabbionenevermind ... i found09:50
Keybukyup, just reading bugs09:53
fabbioneKeybuk: i just noticed that my usb hd installation is showing a different symptoms from yesterday09:57
fabbionebasically i can see initramfs that attempts to drop me to a shell09:58
fabbioneat the same time the hd is recognized as sda09:58
fabbioneand it deadlocks09:58
fabbioneno shell09:58
fabbioneno boot09:58
fabbioneso i assume we are getting closer09:58
Keybukinteresting09:58
fabbionemy temporary fix is to just run udevplug09:58
fabbionewith no options09:58
fabbioneand sleep a few secs for the device to be available09:58
fabbionebut clearly is suboptimal09:59
Keybukcan you find out what device you actually need to be plugged?09:59
Keybukwalk /sys doing echo > .../uevent for each thing that exists until it works09:59
fabbionemeh dude10:01
fabbionethe problem is that the device is recognized later during the boot10:01
fabbionehow can i do that in initramfs since it doesn't even drop me to a shell anymore?10:01
Keybukbreak=premount10:07
Keybuk(on the kernel command line)10:07
Keybukif a plain "udevplug" finds the device, then it means that my filter in the initramfs excludes it10:07
Keybukso we need to find the device, and then add some detail (usually the PCI class) to the filter10:07
fabbionei think i know which one it is10:09
fabbionewhat i notice when i do udevplug manually10:09
fabbioneis that i get the usb host controller module loaded10:10
fabbionedo you actually load them?10:10
fabbioneand if you can tell me what class it is i can easily test it10:10
KeybukI should load them10:10
fabbionewell i notice the message of "overcurrent from USB"10:11
KeybukI load everything of class 0x0c*10:11
fabbionelike if the device is initialized for the first time10:11
fabbioneok.. workrave is yelling at me.. brb10:11
fabbionere10:23
fabbioneahh10:59
fabbioneKeybuk: i think i know what's wrong11:00
fabbioneit might be a PEBCAK11:00
fabbionei am checking again now11:00
fabbioneit's difficult to test this env cleanly11:00
fabbioneKeybuk: i did check again.. i think there is race somewhere11:38
fabbioneusplash is telling me that the system is waiting for root11:39
fabbioneit drops me back that /dev/foo doesn't exists and wants to go to console11:39
Keybukfabbione: interesting11:39
fabbioneat the same time i see that the modules are loaded11:39
Keybukdrops you back after 30s or so?11:39
fabbioneno, much faster than that11:39
fabbioneit seems like it's happening outside the loop11:39
Keybukweird11:40
fabbionei know, it takes something like 2 seconds to get there once Waiting for root appears11:40
Keybukso it's dropping out of the loop?11:40
fabbionei guess so11:40
Keybukthat suggests the root device has appeared11:40
fabbioneyes11:40
fabbionebut it fails to mount it?11:40
Keybukright11:40
fabbionethe error is: "ALERT! /dev/sda1 doens't exists. Dropping to a shell!"11:41
fabbionebut i never get to the shell11:41
fabbioneeven waiting forever11:41
fabbioneand after that message i see that sda did appear11:41
Keybukok ...11:44
Keybukkooky11:44
Keybukare you using root=/dev/sda1 ?11:44
fabbioneyes11:44
Keybukdoes /dev/sda1 exist?11:45
fabbioneafter the modprobing yes11:45
fabbionehttp://people.ubuntu.com/~fabbione/grub.diff11:45
Keybukhuh?11:45
Keybukright11:45
Keybukso you get Waiting for root filesystem11:45
Keybukafter 2s you get "/dev/sda1 doesn't exist"11:46
Keybukat the point you're dropped to a shell11:46
Keybukand /dev/sda1 doesn't exist11:46
Keybukif you modprobe <something> then it exists?11:46
fabbionei can't modprobe anything11:46
fabbionethe shell is not there11:46
fabbioneeven it tells me that's dropping to a shell11:46
Keybukis the shell on a different vt?11:46
fabbionenope11:46
fabbionealready checked11:46
Keybuk(I assume you're doing this without "splash" in the kernel command line?)11:46
fabbioneah yes11:47
fabbioneif i type exit at the shell, it just works11:47
Keybukat what shell?!11:47
fabbionebecause the device is there11:47
Keybukyou just said you didn't have a shell11:47
fabbionei was wrong11:47
Keybukoh11:47
fabbioneit was on alt+f811:47
Keybukheh11:47
fabbionei did stop at alt+f611:47
Keybukok...11:48
fabbioneYOU ALL HATE ME YOU BASTARDS!11:48
Keybukso do that again11:48
Keybuktake out splash and quiet11:48
fabbioneyou are driving me insate11:48
fabbioneinsane11:48
Keybukand tell me exactly what you see for each part of the boot11:48
Keybukhow long it waits11:48
Keybuketc.11:48
fabbioneok11:48
fabbionegimme a few.. it takes long to boot that stuff11:48
fabbioneok11:52
fabbionethis is what i see:11:52
fabbioneWaiting for root11:52
fabbionedone11:52
fabbioneMounting root f11:53
fabbioneRunning local-top11:53
fabbionedone11:53
fabbioneALERT! /dev/sda1...blabla shell!11:53
Keybukright11:53
fabbionei get the shell in busy box11:53
Keybukhow long does it wait after "Waiting for root" ?11:53
fabbioneprobably 2 seconds11:53
Keybukoh meh11:53
KeybukI see the bug11:53
KeybukI dropped a "0"11:53
fabbioneas soon as I enter the busybox11:54
Keybukmust have done that by accident when I stopped usplash from timing out11:54
fabbionei see the messages from the kernel that sda is appearing11:54
fabbioneok11:54
fabbionegood11:54
=== fabbione uploads the last grub bits to make this spec a reality
fabbioneKeybuk: do you want me to test a patch before you upload?11:55
fabbionei can do that easily11:55
fabbioneit just takes a few minutes to reboot the thingy :)11:56
Keybukchange the slumber=30 line to 300 in the udev initramfs premount hook11:56
Keybuk/usr/share/initramfs-tools/scripts/init-premount/udev11:57
Keybukand update-initramfs -u11:57
fabbionetesting11:58
fabbioneKeybuk: score12:04
fabbionebut i need to lart you for uploading glibc!12:05
Keybukwhy?12:10
fabbionei was almost at the end of the build on sparc :P12:10
=== fabbione starts again
Keybuklol12:12
fabbionewell it's all ccached12:13
fabbioneit won't take ages12:13
MithrandirKeybuk: I don't see any /dev/disk/by-* in the initramfs, is that intentional?01:04
fabbioneif that's intentional, we can't implement prob-for-root :)01:15
Mithrandirsure we can01:17
MithrandirI have persistent live cds almost working already.01:18
fabbioneMithrandir: no wwithout disk-by-uuid01:28
=== jbailey [n=jbailey@modemcable139.249-203-24.mc.videotron.ca] has joined #ubuntu-boot
=== mgalvin [n=mgalvin@ubuntu/member/mgalvin] has joined #ubuntu-boot
KeybukMithrandir: kinda03:22
Keybukit's more that there's nothing unneeded in the initramfs03:22
Keybukwhen we come to need those, we'll add them03:22
Keybukis just a matter of copying the rules and helpers03:22
MithrandirKeybuk: apparently, the rule is there already03:22
Keybukit is?03:23
Keybukhmm03:23
Keybukwonder why they don't work then03:23
Mithrandiralso, how can I wait until usb hotplugging is done?03:25
MithrandirKeybuk: ^^03:31
Keybukdefine "done"03:32
Mithrandirwhen the nodes are in /dev and accessing them will yield a sensible result.03:32
Keybukwhile [ ! -e $NODE ] ; do03:32
Keybuk    sleep 103:32
Keybukdone03:32
Keybukpretty much like the udev init-remount script does for scsi/usb/ieee1394/etc. devices03:33
Mithrandirwell, it might never appear. :-)03:33
Keybukyeh03:33
MithrandirI want to use a block device with a specified label as the backend storage for casper03:33
Keybukthe kernel guys take on this is that you should do it in a udev event or something03:33
Mithrandirbut if it's not there, I'll use a tmpfs03:34
Keybukthey refuse to add any kind of "I've finished scanning the bus" notification03:34
Keybukto either USB, SCSI, SATA, etc.03:34
Mithrandirso there's no way to accomodate my use case?03:35
MithrandirI obviously don't want to just sleep five seconds and see if anything comes by.03:37
Keybukdoes that existing affect what you'd ordinarily do next?03:40
Mithrandiryes.03:41
Keybukthen yeah, no easy way03:41
Mithrandirsince if a device with a given label exists, I'll mount that.  If not, I'll mount something else.03:41
Mithrandirthen, I'll mount the cd and unionfs mount those together.03:41
Mithrandircan I do something like udevplug -Busb, or won't that give me what I think it might?03:44
Keybukwon't do what you think03:45
Keybukthat will wait for anything already known to be on the USB bus to be configured03:45
Keybukit won't find new things on the bus03:45
MithrandirI'm not too worried about the use-case of somebody plugging it in halfway03:46
Mithrandirso if I can just say "please plug any USB and tell me when you're done", that's fine.03:47
Keybukright, but USB isn't instant03:47
Keybukin theeeeeory03:47
Keybukif you run after the udev init-premount script, then any USB devices the kernel knows about are there, or not there03:48
Keybukbut if you have a slow USB hub or controller somewhere, you're racing it03:48
Mithrandirit might be that the device hasn't settled yet as well?03:49
Keybukindeed03:50
Mithrandirthis situation really sucks.03:51
MithrandirI guess the /sys entries aren't there either?03:57
Keybukexactly04:00
Keybukthe kernel pov is that if the device hasn't settled, then how's the kernel supposed to know it's there?04:00
Keybukthe kernel does a USB scan, and announces the devices as and when they report back04:00
Keybukif they wanted to add a "finished!" thing, they'd have to sleep-and-loop-and-timeout04:01
Keybukwhich is the kind of thing that belongs in userspace04:01
Mithrandirso I can say "please scan the USB bus" and then sleep for a couple of seconds, then look in /sys/block and it should be ok-ish?04:02
Keybukyeah04:02
Mithrandirand udevplug -Busb does the first part?04:02
Keybukno04:03
Keybukudevplug is a cold-plugging tool, it's for catching up on missed kernel events04:03
Keybukudev already takes care of the -Busb thing04:03
Mithrandirso I can just sleep five seconds or something and scan, then?04:04
KeybukI assume you're running after the udev init-premount script?04:05
Mithrandiryeah, this is a replacement for /scripts/local04:05
Keybukright04:05
Keybukyou may be able to just look for the device straight away04:06
Keybukthe time taken to get there should be enough for the device to show up04:06
Keybukand udevd will handle making the device node for you in the background04:06
Mithrandirdoesn't appear to be on my system04:06
Keybukdoes it appear if you sit and wait for a few seconds?04:06
Mithrandirlet me check with break=premount04:07
Keybukbreak=mount would maybe be better ;)04:07
Mithrandirwell, yes.04:07
Mithrandir:-)04:07
Mithrandir"Spawning shell..\n", then messages about sdb (which is the usb memory stick in question here)04:08
Keybuk"the red car and the blue car had a race"04:10
Mithrandirthe blue is consistently winning on my system, though.04:10
Keybukthat's because smart ol' Blue chose the Milky Way04:11
Mithrandirok, that works now.04:39
Mithrandirhuzza!  Working live cd persistency.04:57
=== fabbione [i=fabbione@gordian.fabbione.net] has joined #ubuntu-boot

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!