[09:12] <Abecedarian> Hello.  By any chance could somebody here answer a few questions on booting and the linux kernel, particularly as it relates to having a linux kernel loads modules and executse the linuxrc?
[09:19] <Mithrandir> possibly, if you ask your question
[09:20] <Abecedarian> Thanks!
[09:21] <Abecedarian> I'm in the process of building a boot disk that will allow be to boot a USB external Ubuntu on computers unable to boot via USB.
[09:21] <Mithrandir> as in, boot off an USB enclosure or something?
[09:21] <Abecedarian> Basically, from articles taht I've read (http://www-128.ibm.com/developerworks/linux/library/l-fireboot.html and http://www.neowin.net/forum/lofiversion/index.php/t269145.html) it *can* be done.
[09:21] <Abecedarian> Yeah.
[09:22] <Mithrandir> where are you going to get the initramfs and kernel off?  (And bootloader)
[09:22] <Abecedarian> The method seems to be to have a copy of the kernel on the boot cd which will then run a linuxrc script which scans for the USB device after loading the proper drivers/modules, after which (if it detects) it will relocate root to the proper device.
[09:23] <Mithrandir> you might want to look at casper
[09:23] <Keybuk> aye, we've solved much of these problems in Ubuntu already
[09:23] <Abecedarian> Two ways.  I have a modified script from the neowin article (via a friend) that generates a boot image.  Also, it is possible to just download their complete image and edit the contents.
[09:24] <Mithrandir> Abecedarian: also, have you seen https://wiki.ubuntu.com/BootingFromUS ?
[09:24] <Mithrandir> uhm
[09:24] <Mithrandir> https://wiki.ubuntu.com/BootingFromUSB
[09:27] <Abecedarian> No, I hadn't had a chance to look over https://wiki.ubuntu.com/BootingFromUS ...  But from a glance I'd have to say that I'm uncertain it would apply to computers that lack a BIOS capable of detecting or booting to USB devices.
[09:28] <Abecedarian> Which is a major issue for "Portable Ubuntu" on an external.
[09:28] <robotgeek> it would be nice to grab a bootable cd and boot from it.
[09:29] <Abecedarian> That and the article seems a bit...  short.  Or vague.  No offense to whomever wrote it, but it still looks like they're working on it.
[09:29] <Abecedarian> Working on a similar project, I mean.
[09:29] <robotgeek> Abecedarian: it seems more like comments on a spec, the BootingFromUSB page
[09:30] <Keybuk> Abecedarian: *shrug* that kind of thing is easy, especially in dapper
[09:30] <Keybuk> you stick the kernel and initramfs on something the bios can boot
[09:30] <Keybuk> and then the rest of the system on a USB devic
[09:30] <Mithrandir> it's a spec, it's not an article.
[09:30] <Abecedarian> Exactly!
[09:31] <Abecedarian> And, as I understand from the articles, it must execute something called "linuxrc" in "initrd".  At least, that is one method.
[09:31] <Abecedarian> I've found bootable images and toyed with modifying them a bit, but it always runs into a kernel panic somewhere down the road.
[09:31] <Abecedarian> I think when it tries to relocate root since it does manage to boot and does manage to load thekernel.
[09:33] <Abecedarian> And since I have template images, a copy of my kernel, and a possibly superior template linuxrc script, I was hoping you might be able to enlighten me on how the initrd and linuxrc scrip on the boot disk "work".
[09:33] <robotgeek> Keybuk: i have a dapper flight cd 3. i'll play around with it
[09:33] <Keybuk> that stuff's out of date now
[09:33] <Keybuk> we don't use either initrd or linuxrc
[09:33] <Keybuk> robotgeek: use root=/dev/disk/by-label/VOLLABEL and it _should_ just work
[09:35] <robotgeek> Keybuk: do i put grub on the external hdd?
[09:35] <Mithrandir> it might even work to boot off a live cd with approximately that command
[09:35] <Keybuk> robotgeek: if grub is on the external HDD, your bios would need to be able to boot from that HDD
[09:35] <Keybuk> if the bios can, the installer will just let you do it
[09:36] <Keybuk> if the bios can't, the installer won't
[09:36] <Kamion> Abecedarian: the initramfs on the boot disk is a gzipped cpio archive; the kernel unpacks it and executes /init in early userspace; that program is then responsible for finding and mounting the real root device (and other stuff) and chaining to /sbin/init there
[09:36] <robotgeek> Keybuk: my macs do allow that, my pc doesn't
[09:36] <Kamion> robotgeek: Fabio only fixed grub-installer to allow that recently (post-Breezy)
[09:37] <robotgeek> Kamion: i tht i put grub on the external boot disk with a shipit
[09:38] <Kamion> it certainly didn't do it automatically ...
[09:38] <Kamion> well, not unless you have a "special" BIOS, which isn't out of the question :)
[09:39] <Keybuk> "spethial"
[09:40] <robotgeek> Kamion: i booted from the install cd , it detected my external usb hdd, and asked me if i was sure if i wanted to install it there
[09:40] <Kamion> lucky, then :)
[09:40] <robotgeek> any good resources on where to read up on the process we follow for booting?
[09:41] <Keybuk> LWN have done some good articles on it
[09:41] <robotgeek> don't want to ask you stupid questions and waste your time :)
[09:41] <Keybuk> also our Wiki contains many of the specs we've followed
[09:41] <Keybuk> in particular, read EarlyUserspace, UdevRoadmap, HardwareDetection, ProbeForRootFilesystem, BootFromUSB, etc.
[09:41] <robotgeek> okay, i'll check CatergorySpec then
[09:42] <Keybuk> also the source code can often help :)
[09:42] <Keybuk> fortunately much of it is written in plain old shell
[09:43] <robotgeek> i'm okay with bash scripting, so i guess i won't have much of an issue
[09:43] <Abecedarian> I'm a bit of a n00b...  But I'm a little confused.  If the goal is to boot *to* usb rather than *from* it, what is the relationship between the two reverse methods?
[09:44] <Keybuk> you never boot to something
[09:44] <Keybuk> so the phrase doesn't make sense :)
[09:45] <Keybuk> you boot from something
[09:45] <Keybuk> how much of the boot process you can do from that item is up to your computer's bios, usually
[09:45] <Abecedarian> *lol*  Okay, well, run it from usb but boot it from cd.
[09:45] <Keybuk> with BootFromUSB, our goal is that you can insert the key and supporting BIOS will boot directly from it
[09:45] <robotgeek> we were more interested in making a bootable cd which along with our external hdd, we could take our ubuntu where ever we go
[09:46] <Keybuk> with non-supporting BIOS you need a boot-strapping tool, like a LiveCD, floppy "boot" disk, or internal HDD -- which contains the kernel and initramfs
[09:46] <robotgeek> Keybuk: do they have to match the version installed?
[09:46] <Keybuk> robotgeek: they should, yes
[09:46] <Abecedarian> Our goal is a bit of a helper for yours...  To make it work even on computers without the BIOS supporting USB booting.
[09:47] <Keybuk> Abecedarian: we intend to support this out of the box
[09:47] <Keybuk> it should work now
[09:47] <robotgeek> well, that's a relief :)
[09:47] <Keybuk> install Flight 3 onto your USB key, and boot it by inserting the Flight 3 Live-CD and changing the root= line to be root=/dev/disk/by-label/VOLNAME where VOLNAME is the name of your USB key
[09:48] <robotgeek> so, once i get upgrades to flight 3, what happens?
[09:49] <robotgeek> the kernel on dapper flight 3 wont match the one on the cd?
[09:49] <Keybuk> righ
[09:49] <Keybuk> your kernel needs to match the userland you're booting
[09:49] <Keybuk> because the drivers are on the USB key :)
[09:50] <robotgeek> true
[09:50] <Abecedarian> But a dapper flight 3 live cd would work fine, we'd just have to disable updates until a newer livecd comes out?
[09:50] <robotgeek> maybe we can make a small boot cd everytime we upgrade the kernel
[09:51] <Keybuk> LiveCDs always come out at the same time as Installer CDs
[09:51] <Keybuk> yes, you could also place the kernel, initramfs and bootloader on a custom CD of your own
[09:51] <Keybuk> or, if your computers support PXE, these could be on the network
[09:51] <robotgeek> nice...gotta try the flight cd's then
[09:52] <Abecedarian> So we could just take a live cd, "hollow out" most of it, and then tell it to automatically boot to the external saving us having to type it in each time.  And update the kernel to non-flight versions if we do update the dapper kernel on the external?
[09:53] <robotgeek> looks like someone was pissed when they wrote this. https://wiki.ubuntu.com/UdevRoadmap
[09:53] <Mithrandir> flight 3 live doesn't support booting off ieee1394, current dailies should
[09:53] <Mithrandir> (once they're buildable)
[09:53] <Keybuk> robotgeek: I don't recall being drunk ... why?
[09:54] <robotgeek> hotplug: Ask the ftpmasters to eject it from the archive like the bitch it is.
[09:54] <Keybuk> Mithrandir: really, what did we miss to not support that?
[09:54] <Keybuk> robotgeek: heh, that's just my writing style
[09:54] <Mithrandir> Keybuk: sbp2 and ohci1394
[09:54] <Keybuk> Mithrandir: ah, not in the initramfs?
[09:57] <Mithrandir> corrcet
[09:57] <Mithrandir> correct, even
[09:58] <Keybuk> udev loads them if they are, though?
[09:59] <Mithrandir> yes,
[09:59] <Mithrandir> so if we could actually get -desktop installable, I could get a test image out so I could ask people to test it
[10:01] <Keybuk> woo, I rock :)
[10:01] <Keybuk> why does desktop need to be installable to make Live CDs now?  I never did know why that is
[10:01] <Kamion> Keybuk: live fs build script fails otherwise
[10:02] <Kamion> since it's doing apt-get install ubuntu-desktop or similar
[10:02] <robotgeek> okay guys, thanks for your time. i'll put on dapper cd , and bug you guys later.
[10:04] <Abecedarian> One other question...  I've been reading that there are efforts to make Ubuntu installed on externals more "adaptable" - ie, like a live cd.  Do you have any recommended documentation on (a) what ways a livecd's adaptability differs from a regular install and (b) developments on fixing it?
[10:06] <Mithrandir> I'm not sure what you mean.
[10:06] <Abecedarian> As in a livecd goes out of its way to scan for devices (screen, etc) and reconfigure the gui and other things to work on that computer...
[10:07] <Abecedarian> While a regular install on an external may sometimes get comfortable on whatever computer it normally is used with and as a result might run into issues when booted on multiple computers.
[10:08] <Abecedarian> A regular install might flat-out not have any problems constantly being moved around, but without having a working external install yet I should definitely read up as much as possible in case it is an issue.
[10:09] <Mithrandir> you can do most of that by using a livecd and persistent storage, I'd guess.
[10:10] <Mithrandir> I've also pondered changing the live cd so it'll allow easy installs and -boots on fat32 and ntfs drives.
[10:11] <Abecedarian> But using persistent storage is a bit different than using the livecd to boot with root being located on the external, correct?
[10:11] <Mithrandir> yes.
[10:16] <Abecedarian> So is the difference significant enough to limit portability of a install, and which documentation should I read up on for figuring out how to resolve it?
[10:18] <Mithrandir> the problem with doing automatic reconfiguration at each boot is mostly related to stability of configuration.
[10:20] <Abecedarian> Okay...  is there any documentation you would recommend reading to learn more about increasing stability and reconfiguring?
[10:28] <Mithrandir> none which springs to my mind immediately, at least
[10:29] <Mithrandir> it's basically that if you have a working configuration, you don't want to change it, since you might end up ruining hand-tweaked configs or even generated configs.