Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #60429 > unrolled thread
| Started by | Kevin Hilman <khilman@baylibre.com> |
|---|---|
| First post | 2018-03-08 20:20 +0100 |
| Last post | 2018-03-10 00:20 +0100 |
| Articles | 8 — 3 participants |
Back to article view | Back to linux.debian.kernel
Bug#892407: initramfs-tools: scripts/local: ignore /dev/ram* Kevin Hilman <khilman@baylibre.com> - 2018-03-08 20:20 +0100
Bug#892407: initramfs-tools: scripts/local: ignore /dev/ram* Ben Hutchings <ben@decadent.org.uk> - 2018-03-09 02:00 +0100
Bug#892407: initramfs-tools: scripts/local: ignore /dev/ram* Kevin Hilman <khilman@baylibre.com> - 2018-03-09 02:20 +0100
Bug#892407: initramfs-tools: scripts/local: ignore /dev/ram* Ben Hutchings <ben@decadent.org.uk> - 2018-03-09 03:40 +0100
Bug#892407: initramfs-tools: scripts/local: ignore /dev/ram* Kevin Hilman <khilman@baylibre.com> - 2018-03-09 20:30 +0100
Bug#892407: initramfs-tools: scripts/local: ignore /dev/ram* Ben Hutchings <ben@decadent.org.uk> - 2018-03-09 03:30 +0100
Processed: Re: Bug#892407: initramfs-tools: scripts/local: ignore /dev/ram* "Debian Bug Tracking System" <owner@bugs.debian.org> - 2018-03-09 02:00 +0100
Bug#892407: marked as done (initramfs-tools: scripts/local: ignore /dev/ram*) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2018-03-10 00:20 +0100
| From | Kevin Hilman <khilman@baylibre.com> |
|---|---|
| Date | 2018-03-08 20:20 +0100 |
| Subject | Bug#892407: initramfs-tools: scripts/local: ignore /dev/ram* |
| Message-ID | <vr9f4-2vP-3@gated-at.bofh.it> |
Package: initramfs-tools
Version: 0.130
From a2aef0d83cd19d9b69a747c7ddbcee564faac914 Mon Sep 17 00:00:00 2001
From: Kevin Hilman <khilman@baylibre.com>
Date: Thu, 8 Mar 2018 11:01:38 -0800
Subject: [PATCH] scripts/local: ignore /dev/ram*
These scripts are already running in a ramdisk, so ignore
any root=/dev/ram* so we don't waste 30 sec looping.
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
---
scripts/local | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/local b/scripts/local
index 4ec926cae6cb..103a8fffd7c7 100644
--- a/scripts/local
+++ b/scripts/local
@@ -60,6 +60,14 @@ local_device_setup()
local time_elapsed
local count
+ # We're already in a ramdisk, don't waste 30 sec looping waiting
+ # for /dev/ram* devices
+ expr match ${dev_id#/dev/} "ram" > /dev/null
+ if [ $? = 0 ]; then
+ echo "Ignoring ${dev_id}. We're already in a ramdisk."
+ return 1
+ fi
+
wait_for_udev 10
# Load ubi with the correct MTD partition and return since fstype
--
2.11.0
[toc] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2018-03-09 02:00 +0100 |
| Message-ID | <vrey5-5Oh-1@gated-at.bofh.it> |
| In reply to | #60429 |
[Multipart message — attachments visible in raw view] — view raw
Control: tag -1 moreinfo Are you trying to fix the LAVA health check? Ben. -- Ben Hutchings compatible: Gracefully accepts erroneous data from any source
[toc] | [prev] | [next] | [standalone]
| From | Kevin Hilman <khilman@baylibre.com> |
|---|---|
| Date | 2018-03-09 02:20 +0100 |
| Message-ID | <vreRr-6cw-1@gated-at.bofh.it> |
| In reply to | #60431 |
I'm not sure exactly what you're referring to, so I guess that means no. I'm just trying to avoid an unnecessary delay when "root=/dev/ram*" is (mistakenly) used on the command-line when passing in the debian ramdisk. If that happens, it eventually falls through to the initramfs shell, but not before trying 30 times (with a "sleep 1" between each) to find another ramdisk on /dev/ramX On Thu, Mar 8, 2018 at 4:55 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > Control: tag -1 moreinfo > > Are you trying to fix the LAVA health check? > > Ben. > > -- > Ben Hutchings > compatible: Gracefully accepts erroneous data from any source >
[toc] | [prev] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2018-03-09 03:40 +0100 |
| Message-ID | <vrg6R-72t-1@gated-at.bofh.it> |
| In reply to | #60433 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, 2018-03-08 at 17:08 -0800, Kevin Hilman wrote: > I'm not sure exactly what you're referring to, so I guess that means no. Aren't you using LAVA in conjunction with kernelci? That's where I've seen this odd usage of "root=/dev/ram0" before. > I'm just trying to avoid an unnecessary delay when "root=/dev/ram*" is > (mistakenly) used on the command-line when passing in the debian > ramdisk. If that happens, it eventually falls through to the > initramfs shell, but not before trying 30 times (with a "sleep 1" > between each) to find another ramdisk on /dev/ramX I'm pretty sure "break" does what you need. Ben. -- Ben Hutchings compatible: Gracefully accepts erroneous data from any source
[toc] | [prev] | [next] | [standalone]
| From | Kevin Hilman <khilman@baylibre.com> |
|---|---|
| Date | 2018-03-09 20:30 +0100 |
| Message-ID | <vrvSh-Xf-1@gated-at.bofh.it> |
| In reply to | #60435 |
On Thu, Mar 8, 2018 at 6:37 PM, Ben Hutchings <ben@decadent.org.uk> wrote: > On Thu, 2018-03-08 at 17:08 -0800, Kevin Hilman wrote: >> I'm not sure exactly what you're referring to, so I guess that means no. > > Aren't you using LAVA in conjunction with kernelci? That's where I've > seen this odd usage of "root=/dev/ram0" before. Yes, this came up in the contect of kernelCI. >> I'm just trying to avoid an unnecessary delay when "root=/dev/ram*" is >> (mistakenly) used on the command-line when passing in the debian >> ramdisk. If that happens, it eventually falls through to the >> initramfs shell, but not before trying 30 times (with a "sleep 1" >> between each) to find another ramdisk on /dev/ramX > > I'm pretty sure "break" does what you need. Well, break does what you describe, but not exactly what I need. I'm trying to workaround the (mis)use of root=/dev/ramX on the commandline. If I could add stuff to the kernel command-line, I would instead just remove the "root=/dev/ramX" rather than add "break=premount", but I'm trying to solve the problem for LAVA labs that we don't control, so we cannot change all the device-types out there and remove "root=/dev/ram0". So, back to the patch at hand... Is there ever a usecase for the debian initrd.img to switch_root to another initrd/ramdisk? If so, then my proposed patch is invalid. If not, then it's a nice optimization and fixup for (mis)use of root=/dev/ram in conjuction with an existing initrd/ramdisk. Kevin
[toc] | [prev] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2018-03-09 03:30 +0100 |
| Message-ID | <vrfXb-6VV-1@gated-at.bofh.it> |
| In reply to | #60431 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, 2018-03-09 at 00:55 +0000, Ben Hutchings wrote: > Control: tag -1 moreinfo > > Are you trying to fix the LAVA health check? A longer and possibly more helpful answer: 1. initramfs-tools is primarily meant for booting a "real" system. The "root" kernel parameter says where that system is. It doesn't make sense to me to overload that parameter. 2. An initramfs is not the same thing as a ramdisk. Treating device names matching /dev/ram* specially could possibly conflict with a configuration where both an initramfs and a ramdisk are used. 3. There is already a way to tell initramfs-tools abort the boot process and start a shell - the "break" parameter, documented in initramfs-tools(8). (Hmm, that should probably be in section 7.) Ben. -- Ben Hutchings compatible: Gracefully accepts erroneous data from any source
[toc] | [prev] | [next] | [standalone]
| From | "Debian Bug Tracking System" <owner@bugs.debian.org> |
|---|---|
| Date | 2018-03-09 02:00 +0100 |
| Subject | Processed: Re: Bug#892407: initramfs-tools: scripts/local: ignore /dev/ram* |
| Message-ID | <vrey5-5Oh-3@gated-at.bofh.it> |
| In reply to | #60429 |
Processing control commands: > tag -1 moreinfo Bug #892407 [initramfs-tools] initramfs-tools: scripts/local: ignore /dev/ram* Added tag(s) moreinfo. -- 892407: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892407 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
[toc] | [prev] | [next] | [standalone]
| From | "Debian Bug Tracking System" <owner@bugs.debian.org> |
|---|---|
| Date | 2018-03-10 00:20 +0100 |
| Subject | Bug#892407: marked as done (initramfs-tools: scripts/local: ignore /dev/ram*) |
| Message-ID | <vrzsR-3Vy-3@gated-at.bofh.it> |
| In reply to | #60429 |
[Multipart message — attachments visible in raw view] — view raw
Your message dated Fri, 09 Mar 2018 23:10:50 +0000 with message-id <1520637050.2495.57.camel@decadent.org.uk> and subject line Re: Bug#892407: initramfs-tools: scripts/local: ignore /dev/ram* has caused the Debian Bug report #892407, regarding initramfs-tools: scripts/local: ignore /dev/ram* to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 892407: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892407 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.kernel
csiph-web