Skip to contentSkip to conversation

dracut and ubuntu 8.10

PATCH Seewer Philippe 3 participants 6 messages Feb 27, 2009 – Mar 6, 2009 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Hello all

Today I actually just wanted to give Victor Lowther's network patches a go and see how far they can go. But first I thought why not try and get dracut running on my own system. Well, it didn't go straightforward, hence my series of patches this day. (Sorry Victor, testing network stuff will have to wait until next Friday)

But at last: success! Dracut now boots my notebook!

Here's how:

0) Get dracut ;-)

1) Apply the patches I sent today

2) Depending on whether or not you need cryptsetup and/or lvm chmod -x 90crypt.sh and/or 90lvm.sh inside dracut/modules

3) Apply the patch below to get the correct ubuntu udev stuff

4) If you're on a x86-64 system (ubuntu amd64 install) make sure /lib64 does point to just 'lib' not '/lib':

$ sudo bash
$ cd /
$ rm /lib64
$ /lib/ld-linux.so.2 /bin/ln -s lib lib64

5) create /etc/dracut.conf and add the required drivers for your root-disk. And don't forget to add sd_mod (and sg just out of paranoia). Otherwise there's no disks at all.

6) Run dracut, build your image, add it to grub, reboot and hopefully enjoy! (Yes, there's no splash screen etc. But hey! It boots!)

Regards,
Philippe

---
modules/95udev-rules.sh | 34 ++++++++++++++++++++++++----------

1 files changed, 24 insertions(+), 10 deletions(-)
modules/95udev-rules.sh +0 -0
index 5951e18..f4067dd 100755
@@ -1,11 +1,25 @@

#!/bin/bash
-# FIXME: would be nice if we didn't have to know which rules to grab....
-# ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies
-# of the rules we want so that we just copy those in would be best
-mkdir -p "$initdir/lib/udev/rules.d"
-#/lib/udev/console_*
-dracut_install udevd udevadm /lib/udev/*_id -inst_rules /lib/udev/rules.d/10-console* /lib/udev/rules.d/40-redhat* \

-    /lib/udev/rules.d/50* /lib/udev/rules.d/60-persistent-storage.rules \
-    /lib/udev/rules.d/61*edd* /lib/udev/rules.d/64* /lib/udev/rules.d/80* \
-    /lib/udev/rules.d/95*

\ No newline at end of file
+# udev rules for ubuntu 8.10
+# content from /usr/share/initramfs-tools/hooks/udev
+mkdir -p "$initdir/etc/udev/rules.d"
+mkdir -p "$initdir/var/run"
+
+dracut_install udevd udevadm pkill
+dracut_install /etc/udev/udev.conf
+
+for rules in 05-options.rules 20-names.rules 40-basic-permissions.rules 60-persistent-storage.rules 61-persistent-storage-edd.rules 80-programs.rules 90-modprobe.rules 95-udev-late.rules; do
+ dracut_install /etc/udev/rules.d/$rules +done
+
+dracut_install /lib/udev/dvb_device_name +dracut_install /lib/udev/usb_device_name +dracut_install /lib/udev/ata_id +dracut_install /lib/udev/usb_id +dracut_install /lib/udev/vol_id +dracut_install /lib/udev/scsi_id +dracut_install /lib/udev/path_id +dracut_install /lib/udev/edd_id +dracut_install /lib/udev/firmware_helper +dracut_install /lib/udev/ide_media +dracut_install /lib/udev/vio_type +dracut_install /lib/udev/watershed -- To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
In reply to a message not in the archive
Quoted 5 lines · Seewer Philippe

Hello all

Today I actually just wanted to give Victor Lowther's network patches a go and see how far they can go. But first I thought why not try and get dracut running on my own system. Well, it didn't go straightforward, hence my series of patches this day. (Sorry Victor, testing network stuff will have to wait until next Friday)

But at last: success! Dracut now boots my notebook!

Excellent!

Quoted 8 lines

Here's how:

0) Get dracut ;-)

1) Apply the patches I sent today

2) Depending on whether or not you need cryptsetup and/or lvm chmod -x 90crypt.sh and/or 90lvm.sh inside dracut/modules

Quoted 8 lines

3) Apply the patch below to get the correct ubuntu udev stuff

4) If you're on a x86-64 system (ubuntu amd64 install) make sure /lib64 does point to just 'lib' not '/lib':

$ sudo bash
$ cd /
$ rm /lib64
$ /lib/ld-linux.so.2 /bin/ln -s lib lib64

Any idea why this is required? That looks like it could break all sorts of things come upgrade time, especially if you actually have a mixed 32/64 bit environment.

Quoted 3 lines

5) create /etc/dracut.conf and add the required drivers for your root-disk. And don't forget to add sd_mod (and sg just out of paranoia). Otherwise there's no disks at all.

6) Run dracut, build your image, add it to grub, reboot and hopefully enjoy! (Yes, there's no splash screen etc. But hey! It boots!)

Splash screens are for wussies anyways. Real Linux Users run without ever touching a framebuffer, and have the output of the kernel boot sequence on every machine they have ever used memorized. :)

Quoted 25 lines

Regards,
Philippe

---
 modules/95udev-rules.sh |   34 ++++++++++++++++++++++++----------
 1 files changed, 24 insertions(+), 10 deletions(-)
modules/95udev-rules.sh +1 -10
index 5951e18..f4067dd 100755
@@ -1,11 +1,25 @@
 #!/bin/bash
-# FIXME: would be nice if we didn't have to know which rules to grab....
-# ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies
-# of the rules we want so that we just copy those in would be best
-mkdir -p "$initdir/lib/udev/rules.d"
-#/lib/udev/console_*
-dracut_install udevd udevadm /lib/udev/*_id 
-inst_rules /lib/udev/rules.d/10-console* /lib/udev/rules.d/40-redhat* \
-    /lib/udev/rules.d/50* /lib/udev/rules.d/60-persistent-storage.rules \
-    /lib/udev/rules.d/61*edd* /lib/udev/rules.d/64* /lib/udev/rules.d/80* \
-    /lib/udev/rules.d/95*
\ No newline at end of file
+# udev rules for ubuntu 8.10

modules/95udev-rules.sh line 12

Quoted 10 lines
modules/95udev-rules.sh +10 -0
+# content from /usr/share/initramfs-tools/hooks/udev
+mkdir -p "$initdir/etc/udev/rules.d"
+mkdir -p "$initdir/var/run"
+
+dracut_install udevd udevadm pkill
+dracut_install /etc/udev/udev.conf
+
+for rules in 05-options.rules 20-names.rules 40-basic-permissions.rules 60-persistent-storage.rules 61-persistent-storage-edd.rules 80-programs.rules 90-modprobe.rules 95-udev-late.rules; do
+    dracut_install /etc/udev/rules.d/$rules 
+done

You can use inst_rules to do the same thing without the for loop.

I should probably patch it to look in ., /lib/udev/rules.d, and /etc/udev/rules.d if passed a filename without a path, though -- that would make things easier to read and maintain.

modules/95udev-rules.sh line 24

Quoted 12 lines
modules/95udev-rules.sh +12 -0
+dracut_install /lib/udev/dvb_device_name 
+dracut_install /lib/udev/usb_device_name 
+dracut_install /lib/udev/ata_id 
+dracut_install /lib/udev/usb_id 
+dracut_install /lib/udev/vol_id 
+dracut_install /lib/udev/scsi_id 
+dracut_install /lib/udev/path_id 
+dracut_install /lib/udev/edd_id 
+dracut_install /lib/udev/firmware_helper 
+dracut_install /lib/udev/ide_media 
+dracut_install /lib/udev/vio_type 
+dracut_install /lib/udev/watershed

dracut_install does take multiple arguments. :)

dracut_install /lib/udev/*_device_name /lib/udev/*_id /lib/udev/firmware_helper \
/lib/udev/ide_media /lib/udev/vio_type /lib/udev/watershed

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 8 lines
Victor Lowther
RHCE# 805008539634727
LPIC-2# LPI000140019

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw
In reply to a message not in the archive
Quoted 21 lines · Victor Lowther
Quoted 5 lines · Seewer Philippe

Hello all

Today I actually just wanted to give Victor Lowther's network patches a go and see how far they can go. But first I thought why not try and get dracut running on my own system. Well, it didn't go straightforward, hence my series of patches this day. (Sorry Victor, testing network stuff will have to wait until next Friday)

But at last: success! Dracut now boots my notebook!

Excellent!

Quoted 12 lines

Here's how:

0) Get dracut ;-)

1) Apply the patches I sent today

2) Depending on whether or not you need cryptsetup and/or lvm chmod -x 90crypt.sh and/or 90lvm.sh inside dracut/modules

3) Apply the patch below to get the correct ubuntu udev stuff

4) If you're on a x86-64 system (ubuntu amd64 install) make sure /lib64 does point to just 'lib' not '/lib':

Quoted 8 lines
Quoted 4 lines
$ sudo bash
$ cd /
$ rm /lib64
$ /lib/ld-linux.so.2 /bin/ln -s lib lib64

Any idea why this is required? That looks like it could break all sorts of things come upgrade time, especially if you actually have a mixed 32/64 bit environment.

Well initially lib64 points to /lib by absolute reference . That works well until switch_root starts cleaning up the initrams. When /lib is gone, so is our loader. I don't yet know what will happen during upgrade time, but my guess is nothing big will happen, sind /lib only contain 64-bit libraries, the 32bit ones go inside /lib32.

This is a workaround to make switch_root work. I guess sometime in the future switch_root will need some more love...

Quoted 8 lines
Quoted 4 lines

5) create /etc/dracut.conf and add the required drivers for your root-disk. And don't forget to add sd_mod (and sg just out of paranoia). Otherwise there's no disks at all.

6) Run dracut, build your image, add it to grub, reboot and hopefully enjoy! (Yes, there's no splash screen etc. But hey! It boots!)

Splash screens are for wussies anyways. Real Linux Users run without ever touching a framebuffer, and have the output of the kernel boot sequence on every machine they have ever used memorized. :)

I have met people who like splash screen actually. But the infrastructure is there now, so anyone who wants can put it in :)

[snip]

Quoted 5 lines

Review

Quoted 3 lines
(quoted diff) +3 -0
+for rules in 05-options.rules 20-names.rules 40-basic-permissions.rules 60-persistent-storage.rules 61-persistent-storage-edd.rules 80-programs.rules 90-modprobe.rules 95-udev-late.rules; do
+    dracut_install /etc/udev/rules.d/$rules 
+done

You can use inst_rules to do the same thing without the for loop.

Ah no I can't. inst_rules puts the rules inside /lib/udev/rules.d and i want them inside /etc/udev/rules.d.... Why not just use dracut install in every module? Would make it a lot easier to read.

Quoted 19 lines

I should probably patch it to look in ., /lib/udev/rules.d, and /etc/udev/rules.d if passed a filename without a path, though -- that would make things easier to read and maintain.

Review

Quoted 12 lines
(quoted diff) +12 -0
+dracut_install /lib/udev/dvb_device_name 
+dracut_install /lib/udev/usb_device_name 
+dracut_install /lib/udev/ata_id 
+dracut_install /lib/udev/usb_id 
+dracut_install /lib/udev/vol_id 
+dracut_install /lib/udev/scsi_id 
+dracut_install /lib/udev/path_id 
+dracut_install /lib/udev/edd_id 
+dracut_install /lib/udev/firmware_helper 
+dracut_install /lib/udev/ide_media 
+dracut_install /lib/udev/vio_type 
+dracut_install /lib/udev/watershed

dracut_install does take multiple arguments. :)

Quoted 2 lines

dracut_install /lib/udev/*_device_name /lib/udev/*_id /lib/udev/firmware_helper \
/lib/udev/ide_media /lib/udev/vio_type /lib/udev/watershed\

Yes I know, see the first dracut_install line in this script. This was just a quick hack, using emacs rectangle mode was just a lot easier and faster than retyping the stuff from the original.

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw
In reply to a message not in the archive

Followup: Harald Hoyers "Merge" repository boots on ub8.10 with a dracut.conf similar to the following one and the attached patch applied

Quoted 1 line

cat dracut.conf

modules="ata_piix sd_mod sg"
dracutmodules="dash kernel-modules debug terminfo udev-rules.ub810 base"

---

modules.d/95udev-rules.ub810/install new file +13 -0
new file mode 100755
index 0000000..f4067dd
@@ -0,0 +1,25 @@
+#!/bin/bash
+# udev rules for ubuntu 8.10
+# content from /usr/share/initramfs-tools/hooks/udev
+mkdir -p "$initdir/etc/udev/rules.d"
+mkdir -p "$initdir/var/run"
+
+dracut_install udevd udevadm pkill
+dracut_install /etc/udev/udev.conf
+
+for rules in 05-options.rules 20-names.rules 40-basic-permissions.rules 60-persistent-storage.rules 61-persistent-s
+    dracut_install /etc/udev/rules.d/$rules +done
+
+dracut_install /lib/udev/dvb_device_name +dracut_install /lib/udev/usb_device_name +dracut_install /lib/udev/ata_id +dracut_install /lib/udev/usb_id +dracut_install /lib/udev/vol_id +dracut_install /lib/udev/scsi_id +dracut_install /lib/udev/path_id +dracut_install /lib/udev/edd_id +dracut_install /lib/udev/firmware_helper +dracut_install /lib/udev/ide_media +dracut_install /lib/udev/vio_type +dracut_install /lib/udev/watershed diff --git a/modules.d/99base/init b/modules.d/99base/init

index 7ff6e4a..3616adc 100755

modules.d/99base/init +0 -0
@@ -55,7 +55,7 @@ getarg 'break=pre-udev' && emergency_shell

source_all pre-udev

# start up udev and trigger cold plugs
-udevd --daemon --resolve-names=never
+udevd --daemon $( [ $(udevd --version) -ge 137 ] && echo --resolve-names=never )
udevadm trigger >/dev/null 2>&1
udevadm settle --timeout=30 >/dev/null 2>&1

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw
In reply to a message not in the archive

I fell into the 80 chars per line trap, sorry about that. the install script was mangled up. this should hopefully fixe it.

---

modules.d/95udev-rules.ub810/install +0 -0
diff --cc modules.d/95udev-rules.ub810/install
index f4067dd,1898fb1..0000000
@@@ -7,7 -7,7 +7,9 @@@ mkdir -p "$initdir/var/run
  dracut_install udevd udevadm pkill
  dracut_install /etc/udev/udev.conf

- for rules in 05-options.rules 20-names.rules 40-basic-permissions.rules 60-per -for rules in 05-options.rules 20-names.rules
40-basic-permissions.rules 60-per
++for rules in 05-options.rules 20-names.rules 40-basic-permissions.rules \
++ 60-persistent-storage.rules 61-persistent-storage-edd.rules \
++ 80-programs.rules 90-modprobe.rules 95-udev-late.rules; do
dracut_install /etc/udev/rules.d/$rules
done

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html