Harald Hoyer | 1 Nov 2011 12:52
Picon
Favicon
Gravatar

Re:

On 25.10.2011 07:55, Renjun Qu wrote:
> Hello everyone:
>          I am building a small embedded linux system right now. I
> confused that why the default rootfs must has a "dev/console" node. I
> have made a experiment as follow:
>         1st, configure the kernel(2.6.32) to support the initramfs
> and initrd, and set the source of the initramfs to a directory which
> only has a "root" node.
>         2nd, configure the kernel to support the root file system on
> nfs, and rebuild the kernel. I have created all necessary files and
> directories in the directory exported by the nfs server.
>         3rd,  set the appropriate boot parameter, and boot my kernel.
>         The result is, the kernel can successfully mount the root
> file system, but the "/sbin/init" program can not print any
> information to me. My "sbin/init" program is just a hello world
> program which only print some greeting information.There is a
> "dev/console" device node in the nfs exported directory.
>         But if i set the source of the initramfs to empty, and redo
> my experiment from the 2nd step,everything will be ok. So, i think
> there must be a “dev/console” node in the rootfs. The real root file
> system already has a "dev/console" node, why default rootfs must have
> a dev/console node. Please help me.
> 
>                          Best regards,
> 
>                             Ren jun Qu
> --
> To unsubscribe from this list: send the line "unsubscribe initramfs" in
> the body of a message to majordomo@...
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)

Daniel Drake | 8 Nov 2011 22:11
Favicon

[PATCH] 99base/init: avoid using cp -t

-t is not supported by busybox's cp.

Signed-off-by: Daniel Drake <dsd@...>
---
 modules.d/99base/init |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules.d/99base/init b/modules.d/99base/init
index 36b2152..e0e2630 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
 <at>  <at>  -133,7 +133,7  <at>  <at>  fi
 if ! ismounted /run; then
     mkdir -m 0755 /newrun
     mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /newrun >/dev/null 2>&1
-    cp -a -t /newrun /run/*
+    cp -a /run/* /newrun
     mount --move /newrun /run
     rm -fr /newrun
 fi
--

-- 
1.7.7

Harald Hoyer | 9 Nov 2011 10:08
Picon
Favicon
Gravatar

Re: [PATCH] 99base/init: avoid using cp -t

Am 08.11.2011 22:11, schrieb Daniel Drake:
> -t is not supported by busybox's cp.
> 
> Signed-off-by: Daniel Drake <dsd@...>
> ---
>  modules.d/99base/init |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/modules.d/99base/init b/modules.d/99base/init
> index 36b2152..e0e2630 100755
> --- a/modules.d/99base/init
> +++ b/modules.d/99base/init
>  <at>  <at>  -133,7 +133,7  <at>  <at>  fi
>  if ! ismounted /run; then
>      mkdir -m 0755 /newrun
>      mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs /newrun >/dev/null 2>&1
> -    cp -a -t /newrun /run/*
> +    cp -a /run/* /newrun
>      mount --move /newrun /run
>      rm -fr /newrun
>  fi

gah... fix busybox... patch applied.
Michal Soltys | 11 Nov 2011 16:45

[PATCH 13/10] features: RUNDIR, imgdir, ... [update 2]

- don't use cp -t (due to busybox's cp)
- add intermediate link to image's tree, to simplify life in init;
  this allows us to switch whole image tree with single 'ln' manipulation,
  instead of going in loop through all /bin, /sbin, ... symlinks;
  we employ that early (see the next point) and before /run move (to not
  lose access to binaries)
- create $prefix (and $prefix_mnt) early, so everything is de-facto
  started from /run/$prefix
- keep /tmp and /var/tmp inside image tree
- simplify det_lib_paths() - make it essentially the same as before
  an earlier patch, but keep it as a separate function
- add a few comments and corner cases fixups

---
 dracut                           |   31 ++++++++++--------
 dracut-functions                 |   29 ++++++----------
 modules.d/99base/init            |   64 ++++++++++++++++++++++---------------
 modules.d/99base/module-setup.sh |    2 +-
 4 files changed, 67 insertions(+), 59 deletions(-)

diff --git a/dracut b/dracut
index 72af2c0..e26e0c3 100755
--- a/dracut
+++ b/dracut
 <at>  <at>  -502,7 +502,7  <at>  <at>  readonly initdir=$(mktemp --tmpdir=/var/tmp/ -d -t initramfs.XXXXXX)
     dfatal "mktemp failed."
     exit 1
 }
-readonly imgdir=/_img newroot=/sysroot
+readonly imgdir=/_img imglnk=/__img newroot=/sysroot
(Continue reading)

Amadeusz Żołnowski | 16 Nov 2011 15:17
Gravatar

[PATCH] Makefile: Append target files names for man pages.

---
 Makefile |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 80173a3..454cd8e 100644
--- a/Makefile
+++ b/Makefile
 <at>  <at>  -40,11 +40,11  <at>  <at>  install: doc
 	install -m 0755 dracut-functions $(DESTDIR)$(pkglibdir)/dracut-functions
 	install -m 0755 dracut-logger $(DESTDIR)$(pkglibdir)/dracut-logger
 	cp -arx modules.d $(DESTDIR)$(pkglibdir)
-	install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8
-	install -m 0644 dracut-catimages.8 $(DESTDIR)$(mandir)/man8
-	install -m 0644 dracut-gencmdline.8 $(DESTDIR)$(mandir)/man8
-	install -m 0644 dracut.conf.5 $(DESTDIR)$(mandir)/man5
-	install -m 0644 dracut.kernel.7 $(DESTDIR)$(mandir)/man7
+	install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8/dracut.8 
+	install -m 0644 dracut-catimages.8 $(DESTDIR)$(mandir)/man8/dracut-catimages.8 
+	install -m 0644 dracut-gencmdline.8 $(DESTDIR)$(mandir)/man8/dracut-gencmdline.8 
+	install -m 0644 dracut.conf.5 $(DESTDIR)$(mandir)/man5/dracut.conf.5 
+	install -m 0644 dracut.kernel.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7 

 clean:
 	$(RM) *~
--

-- 
1.7.8.rc1


Gmane