summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts
Commit message (Collapse)AuthorAgeFilesLines
* init-install-efi.sh: Remove unnecessary udev rules file to avoid errorsDarren Hart2013-09-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes [YOCTO #5233] Modeled after Chen Qi's fix to [YOCTO #3924] from oe-core commit: 6b6db7b4fb7aa17b8e29076decc830149b9d35bc init-install.sh: remove unnecessary udev rules file to avoid error messages /etc/udev/scripts/mount.sh is removed by init-install-efi.sh, but the udev rules file which specifies the invocation of this script is not removed, thus causing the error message during a live install: /etc/udev/scripts/mount.sh: No such file or directory The /etc/udev/rules/automount.rules no longer works once the mount.sh script is removed. Remove it to avoid the error message. (From OE-Core rev: 1f5a2b616d902b1158e348bf8c33b6d36e21cadc) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: mihaix.lindner@linux.intel.com Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install-efi.sh: Fix root= specificationDarren Hart2013-09-241-2/+4
| | | | | | | | | | | | | | | | | | Fixes [YOCTO #5237] The current grub.cfg manipulation depends on an existing root= parameter. If this doesn't exist, the correct root= parameter will not be added. Instead, remove any existing root= parameters and add the correct one explicitly. (From OE-Core rev: 14b124122c1b7d10b9a3a96fe4617c6fc1c661c5) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: mihaix.lindner@linux.intel.com Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "initrdscripts: look for new systemd-udevd location"Ross Burton2013-09-172-2/+2
| | | | | | | | | | | | systemd-udevd is back in /lib, so revert this change. This reverts commit 27bb516be433ed9dcde6fe4a17d2429951a010a0. (From OE-Core rev: 3f6324a86cb8c1c253af06a1033ac71fa61c58d3) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-live.sh: distinguish between a read-only image and a read-write imageChen Qi2013-09-111-11/+18
| | | | | | | | | | | | | | | | | | | | | | | The iso and hddimg share a common concept of 'live image', and they use the same initramfs and thus the same init. However, that init script in initramfs made a wrong assumption that the rootfs image was read-only by itself. This is apparently not true for hddimg. To make things work as expected, this init script should at least distinguish between a read-only rootfs image and a read-write one. This patch adds this ability to the init script. After this change, the init script would be able to check whether the rootfs image is read-only or not. If the rootfs image is read-write, the image will be mounted and then booted directly. No union mounts will be attempted in this case. [YOCTO #5164] (From OE-Core rev: 29f869b68a9017502f75915784a924f0fe9d4be1) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install.sh: fix to handle the boot partition correctlyChen Qi2013-08-201-33/+29
| | | | | | | | | | | | | | | | | | | | Previously, the boot partition was created for the target hard drive but there was no corresponding entry for it in /etc/fstab. Besides, even if the boot partition was mounted, it would just result in odd directory hierarchy like /boot/boot/grub. However, what we really need is /boot/grub. This patch fixes this problem. Besides, for future maintance work, this patch also renames some of the intermediate directories. It uses more descriptive names like /tgt_root and /src_root. The name of /ssd is dropped. [YOCTO #5018] (From OE-Core rev: aa67b1333b4774e1845f562085f7048df65a644f) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install.sh: improve hard drive searching processChen Qi2013-08-201-43/+55
| | | | | | | | | | | | | | | | | | | | Previously, only unremovable hard drives are searched and are treated as candidates of target disks to intall into. However, it's possible that we're going to install the live image into a removable media such as an USB. This patch enables this possibility. In addition, this patch presents more information about the hard drives so that user may have more knowledge about which hard drive they are going to install their image into. [YOCTO #5018] (From OE-Core rev: 358f0584d779825307eec08c023b5ff14e72cf9e) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-live.sh: make $ROOT_MOUNT/media writable when necessaryChen Qi2013-08-161-0/+2
| | | | | | | | | | | | | | | | | | | If the live image is mounted as read-only, we cannot make necessary directories under $ROOT_MOUNT/media, so trying to move the mount points lead to errors. So in case that no unification filesystem mechanism is available in kernel and the rootfs is mounted as read-only, we mount tmpfs on $ROOT_MOUNT/media so that it's possible to make necessary directories under it. [YOCTO #4881] [YOCTO #4103] (From OE-Core rev: aeeb3418ff08dfd29edc0ce8a41cb6887d4e11fe) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: fix bashismChen Qi2013-08-062-8/+10
| | | | | | | | (From OE-Core rev: e6039e6e3b98d6ab91252a5012d76279b1fac6e8) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "initrdscripts: mount / as read-only when live-booting"Ross Burton2013-07-291-3/+3
| | | | | | | | | | | | | My test environment must have been messed up as now hddimgs are failing to re-mount / as read-write. This reverts commit 7af92f8fa3a12fc8fcb22dbd12f87d89768b2d39. (From OE-Core rev: 4174dcbd3328e6badb269d09b024f2b83408bd8c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: mount / as read-only when live-bootingRoss Burton2013-07-241-3/+3
| | | | | | | | | | | So that the root filesystem can be fsck'd properly, mount it read only. Either initscripts or systemd will re-mount as read-write in early boot. (From OE-Core rev: 1ace2bdd8d6d950038fb6d9b83f6eceba276f588) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-live.sh: try to make a union mount when possibleChen Qi2013-06-281-7/+56
| | | | | | | | | | | | | | | | | | This patch tries to make a union mount in live image. For example, if aufs is enabled with the aufs-enable.scc configuration fragment, the init-live.sh script will use aufs to make a union mount. Although overlayfs is not supported by Yocto kernel yet, this patch still takes it into consideration with the expect that the related code should at least serve as a placeholder. [YOCTO #1487] [YOCTO #4761] (From OE-Core rev: 3cd6fedd815688b2f3fd97a56feb5f8696ebeace) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: unionfs cleanupChen Qi2013-06-282-26/+3
| | | | | | | | | | | | | | | The unionfs has been disabled for more than a year and it's not going to be used any more. This patch cleans up the unionfs related code. [YOCTO #4761] [YOCTO #1487] (From OE-Core rev: ba5e437bc7335468a70ea293496f78e1a9d66287) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-live.sh: fix automount failed occasionallyHongxu Jia2013-06-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reboot system repeatedly, occasionally found usb automount failed, a low probability but it happens. $ df Filesystem 1K-blocks Used Available Use% Mounted on none 1024972 4 1024968 0% /dev /dev/sda3 7689384 3540940 3757840 49% /media/sda3 /dev/sda2 146127424 1238432 137466120 1% /media/sda2 /dev/sda1 17845 14570 2354 86% /media/sda1 /dev/sdb 293400 288560 4840 98% /media/sdb /dev/sdc4 457632 32 457600 0% /media/sdc4 /dev/sdc1 475018 2321 447749 1% /media/sdc1 /dev/sdd 1382298 1382298 0 100% /media/sdd /dev/sdc2 475694 2320 448374 1% /media/sdc2 /dev/loop0 270649 181249 75644 71% / df: /media/sdc3: No such file or directory tmpfs 1029352 0 1029352 0% /dev/shm tmpfs 1029352 2816 1026536 0% /run tmpfs 1029352 0 1029352 0% /sys/fs/cgroup tmpfs 1029352 4 1029348 0% /tmp tmpfs 1029352 0 1029352 0% /media/ram tmpfs 1029352 116 1029236 0% /var/volatile When boot media has been found, udev will be killed. If udev is busy to mount other medias at the killing time (especially medias is many), the above issue will occur occasionally. Invoke `udevadm settle' before killing udev will resolve this issue, it watches the udev event queue, and exits if all current events are handled. Use variable `_UDEV_DAEMON' to replace hardcoded `udevd' to keep consistent with previous. [YOCTO #4745] (From OE-Core rev: 2f209a7045a93e7e42f90418a42f464827b4a7f8) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-live.sh: fix media automount failed after booting from usb-driveHongxu Jia2013-06-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1, This issue happens to BSP only. After a BSP board is booted with Yocto linux from USB drive, "cat /proc/mounts" shows: ... /dev/sda3 /media/sda3 ext3 rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered 0 0 /dev/sda1 /media/sda1 ext3 rw,relatime,errors=continue,barrier=1,data=ordered 0 0 /dev/sda2 /media/sda2 ext3 rw,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered 0 0 ... but actually the directory /media/sda1 doesn't exist at all, "df" shows: ... df: /media/sda3: No such file or directory df: /media/sda1: No such file or directory df: /media/sda2: No such file or directory ... 2, This is because the mount data comes from proc setup during early boot before the change root, which then uses a different root filesystem, the media is not in the new root filesystem. 3, During early boot before switch_root, use `mount --move' to move all medias to the new root filesystem could also fix this issue. [YOCTO #2064] [YOCTO #3705] (From OE-Core rev: 79bd773cc5e8b8e873cabeb2b9a91f460501dad7) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "initramfs-live-install*: fix the "install" boot option"Saul Wold2013-05-172-0/+2
| | | | | | | | | | | | | | | This was not the correct fix for this issues, it turns out that base-files package was getting installed un-intentionally when rpm-postinsts was split out. The base-files recipe lays down the link that caused the cat failure. [YOCTO #4504] This reverts commit 45e460d0846f0f660128dc06064b597ce40282b3. (From OE-Core rev: 7d50133dd5c955d97193cc26458ebbf84dbfe0a4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-install*: fix the "install" boot optionNitin A Kamble2013-04-164-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The install boot option was giving the following error when one tried to install the live image on a permanent storage of a BSP. cat: write error Invalid argument Installation image failed sh: can't access tty: job control turned off Further digging into the issue, found out that the install script was trying to do this: cat /proc/mounts > /etc/mtab And in the base-files recipe the /etc/mtab is made soft link to /proc/mounts. So the cat command was failing to write on /etc/mtab. As the contents of the /proc/mounts is already reflected in the /etc/mtab file due to the symlink-ing, there is no need for this step to recreate /etc/mtab in the install script. So just removing this unnecessary step, which solves the install issue of the live images. Fixes this bug: [YOCTO #4229] (From OE-Core rev: f8663eac872882e94d956b1b604304e92b865766) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-boot: explicitly depend on udev-extraconfRoss Burton2013-04-151-1/+1
| | | | | | | | | | init-live.sh depends on udev performing automounting, which happens in udev-extraconf. Explicitly depend on it so that we always have it installed. (From OE-Core rev: a608d74e69ca1efe5f2b176c000fb8212797d056) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: look for new systemd-udevd locationRoss Burton2013-04-132-2/+2
| | | | | | | | | As per the previous commit, systemd-udevd is now in /sbin/systemd/. (From OE-Core rev: ff0fd25206c3c75921d51cb80bcb6c94ca47b405) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: Add udev sbin based libexec pathRichard Purdie2013-04-102-2/+2
| | | | | | | | | | | For better or worse we need to use base_sbindir for udev's libexec dir. This updates the initrdscripts to also cover the new location. I'd prevously assumed that it was already covered but its not. udev internal binaries shouldn't be in PATH so we have to do this to deal with the issue. (From OE-Core rev: 7e17cba75c20ad820d30128d9b4b0132e7b924a8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install.sh: remove unnecessary udev rules file to avoid error messagesChen Qi2013-03-291-0/+1
| | | | | | | | | | | | | | | | | /etc/udev/scripts/mount.sh is removed by init-install.sh, but the udev rules file which specifies the invocation of this script is not removed, thus causing the error message '/etc/udev/scripts/mount.sh: No such file or directory' shown at a live install. The /etc/udev/rules/automount.rules no longer works once the mount.sh script is removed. So we remove it to avoid the error message. [YOCTO #3924] (From OE-Core rev: 6b6db7b4fb7aa17b8e29076decc830149b9d35bc) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* install: Look for grub2 files on the initramfs, not rootfsDarren Hart2013-02-222-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes [YOCTO #3870] atom-pc - cannot boot image on netbook after install The problem here is that grub2 is installed but a grub 1 menu.lst is created at install time. At boot, grub2 doesn't find a grub.cfg file and drops to the grub shell. This happens because the installer is looking for 40_custom (a grub2 file) on the rootfs, but grub2 isn't installed on the rootfs. It exists in the initramfs. Patching the installer to look on the initramfs resolves the problem. Note that the problem may have occurred if grub2 used to be installed on the rootfs but was later removed. In any case, the installer is HORRIBLE and really needs to be completely redesigned as part of the deployment effort. For now, this should get the live image installer limping along again. Tested on a Toshiba NB-305. (From OE-Core rev: 8756a19bd24045d41ad20abb581e7872d0fc9ee6) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: alexandru.c.georgescu@intel.com Cc: sgw@linux.intel.com Cc: ross.burton@intel.com Cc: richard.purdie@intel.com Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfsframework: Improve RDEPENDS to be package specificRichard Purdie2013-02-041-1/+1
| | | | | | (From OE-Core rev: 8c9a604d3ef33d47a48000d6c38159a64204e81e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-boot: Set RDEPENDS on the specific package that needs itRichard Purdie2013-02-041-1/+1
| | | | | | | | | Set the RDEPENDS on the specific package that has the dependency and stop it being applied to for example ${PN}-doc (and others). (From OE-Core rev: 7437a864f03ff56a4fba9d8ce9baf845b945ed9e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramds-framework: add shutdown hook for udevIan Reinhart Geiser2013-02-041-2/+10
| | | | | | | | | | | | | | | In cases where other initramfs modules need to rely on udev running (ie in my case I have to load firmware on a device that is slow to start) there needs to be a way to keep it running during the lifecycle of the initramfs but still be shut down before swith_root is called. I added a module_pre_hook that will shut down udev before the finish module is called. (From OE-Core rev: ce690659ef797bd26dc2be59167aa01744841510) Signed-off-by: Ian Reinhart Geiser <igeiser@devonit.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-live.sh: move /media/xxx over to the real root filesystemChen Qi2013-01-251-0/+2
| | | | | | | | | | | | | | | | | | | | | Previously, the /media/xxx which contains the root image was not moved to be under the real root filesystem. Because of this, the output of the 'mount' command is somewhat confusing, that is, it has some mount point that is not even in the filesystem. Besides, on some machine, it caused the recovery procedure when we booted it next time. This patches fixes this issue by moving the /media/xxx over to be under the real root filesystem. [YOCTO #2064] [YOCTO #3705] (From OE-Core rev: 261d21d36298bb7822ee7370c30441f42ef2b093) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-boot: handle multiple udev locationsRoss Burton2013-01-181-1/+19
| | | | | | | | | | | udevd isn't on $PATH and is in different places depending on what version of udev is being used. Copy the code from initramfs-framework to search for the right udevd at boot time instead of hard-coding a location. (From OE-Core rev: a5de76317112fc065a78a745c2f23775dca15d75) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-live.sh: avoid duplicate mount points for the same filesystemChen Qi2013-01-071-4/+5
| | | | | | | | | | | | | | | | | A live system had duplicate mount points for the same filesystem in the output of 'mount' command. That was because we didn't handle the temporary mounts properly before switch_root. This patch fixes this problem by moving the mount points of some filesystems to the corresponding directories in the real root filesystem. [YOCTO #3155] (From OE-Core rev: 050a745413f8bb26212b84da391e0f7665f77728) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-live: default to initrd shell if image isn't foundAlexandru DAMIAN2012-12-191-1/+21
| | | | | | | | | | | | | | | | | | | Adds "debugshell" command line parameter for live/install images. If the init live fails to find and mount a root-fs image, dumps to a shell after timeout so that the developer can figure what's wrong. Timeout defaults to 30 seconds, but it can be changed as param argument. Prior art in Ubuntu. Also, leaving a system stale isn't good form. (From OE-Core rev: 6f99e530822ac32f32615590e22a9758ac210e84) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: udev: Handle alternative binary pathsOtavio Salvador2012-12-032-6/+21
| | | | | | | | | | | This allows use of udev daemon for different installation destinations so allowing use of udev's from systemd code for initramfs. (From OE-Core rev: 96daf1b3105e17a67acb5027d0418b2ac28b6820) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: init: Stop mount warnings during bootOtavio Salvador2012-12-031-2/+5
| | | | | | | | | | For a completely quiet boot using recent versions of utilities, the /etc/fstab and /var/lock need to be available. (From OE-Core rev: d7a8154d575f918a0a20cb0e3a8f65d02ed32f30) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: fix udevd in the live boot init scriptsRoss Burton2012-11-124-5/+9
| | | | | | | | | | | | | | | udevd moved location and isn't in $PATH anymore, so use an absolute path to start it. The control socket path moved too, so mkdir the directory it's in. Mounts the new devtmpfs on /dev device tree. (From OE-Core rev: 543606e5dc379497c34196d004a214e847f5db2d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Alexandru Damian <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "initrd: Spawn an emergency shell when something goes wrong"Ross Burton2012-10-021-11/+0
| | | | | | | | | | | This had nowhere near enough testing... This reverts commit ffb6928f5783e5202d9849c3a185e29be1d41c63. (From OE-Core rev: f162f0ecc96fdfb564aad968e5b8bc670640ea68) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs: Make mkdir not failDamien Lespiau2012-09-281-3/+3
| | | | | | | | | | | This patch make "mkdir foo" not fail if foo already exists. (From OE-Core rev: 2bf5026933b733701d4d339e01a4f5e4468f368e) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrd: Spawn an emergency shell when something goes wrongDamien Lespiau2012-09-281-0/+11
| | | | | | | | | | | | | set -e allows to exit if a command fails. We install a trap and execute emergency_shell() when either the init script exits or when ctrl-c is typed (say if we are stuck somewhere and we want to debug it). (From OE-Core rev: ae5e2bd994e3f60d3803ab56e6ed34d08fbc56f0) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* EFI: Make installer EFI awareDarren Hart2012-07-193-3/+200
| | | | | | | | | | | | | | | | | | | | | | | | [YOCTO #1919] Create a basic EFI installer script modeled after the existing installer and add it to a new initramfs-live-install-efi recipe. Update the init-live.sh script to distinguish between LABEL=install and LABEL=install-efi and select the appropriate script. Add the efi installer to core-image-minimal-initramfs. Update grub-efi.bbclass to use "LABEL=install-efi" when it detects a label of "install". This is clearly not ideal, but a proper fix would involve decoupling the LABELS assignment from the image-live.bbclass usage of SYSLINUX_LABELS. We should be able to address that in a follow-on clean-up series. V2: Include missing initramfs-live-install-efi_1.0.bb V3: Rebase after Radu's console_params fix (From OE-Core rev: 4bce3417917a3e88ba6529db394525fba82e0699) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add console kernel optionsRadu Moisan2012-07-192-1/+8
| | | | | | | | | | | | | Live image installer did not preserve BSP specified console= kernel parameter. This patch updates the init scripts that are responsible for grub.cfg creation so that options like console= are passed allong from installer to installed img [YOCTO #2426] (From OE-Core rev: e18c59eb5a61f265b9cad6de68359fa1430b0e58) Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: Clean up partition alignmentDarren Hart2012-07-091-4/+4
| | | | | | | | | | | | | | | | The current partitioning scheme leaves a 1MB gap between all the generated partitions by adding a 1 to the end of the last partition to use as the start of the next. parted is smart enough to not overlap start and end positions of the same value. This avoids the 1 MB gaps. Rather than pad the disk with 1MB in the beginning and cut it off at the MB boundary on the end, we can use 0% and 100% to allow parted to do the required math and use as much of the disk as possible. (From OE-Core rev: 8aac6ecc5194c734dfd3d677017ab3ea045b2339) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: Correct ext2->ext3 typo in loggingDarren Hart2012-07-091-1/+1
| | | | | | | | | | We create both the boot and root partitions as ext3 now, update the logging accordingly. (From OE-Core rev: 4436639eed57d818992596d6f0f7b53d3bbd4800) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* init-install: Use swap_ratio in the calulation of swap_sizeDarren Hart2012-07-091-1/+1
| | | | | | | | | | | swap_size currently uses a hard coded percentage and ignores the swap_ratio variable. Fortunately they are the same value currently. Make the calculation use the variable to avoid problems in the future. (From OE-Core rev: 2678ce668499af0e90994b9da8c518e85de56651) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: Update install.sh to work with mmc devicesDarren Hart2012-05-062-22/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes [YOCTO #2385] The installer only searches for hd[ab] sd[ab]. Some newer BSPs have mmcblk devices that should be used as the install target. These devices also have a partition prefix (mmcblk0p1 instead of mmcblk01). As they are detected asynchronously, it is necessary to add the rootwait kernel parameter to avoid a race condition trying to mount the root device. As BSPs like the FRI2 and the sys940x have mmc devices and will have a 1.2 release, we should push this to 1.2.1. The changes are perfectly contained and easily verified. Test for an mmcblk device and add the p partition prefix if necessary. Add the rootwait kernel parameter when an mmcblk device is detected. Replace the series of explicit umount commands with a single umount using a wildcard. This will find all the partitions and will not try to unmount non-existant devices. Avoid copy and paste errors by replacing /dev/${device}${pX} references with the previously assigned rootfs, bootfs, and swap variables. These changes have been tested on the FRI2 Sato image which installed to /dev/mmcblk0 as well as the N450 Sato image which installed to /dev/sda. Both were successful. (From OE-Core rev: bf403680d72e360c7382f540ea25cfdcbe77b4e5) Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-boot: Disable unionfs until its issue with the system rootdir ↵Richard Purdie2012-04-221-4/+5
| | | | | | | | | | | | | | | | are resolved There are issues with the current unionfs when making a union mount over "/". Until these are resolved we can't use unionfs for live booting so disable this temporarily as a workaround. unionfs is usable in other circumstances. [YOCTO #2331 workaround] (From OE-Core rev: 60ee26ae23132b916019d58e20b8c2e1ddd2b471) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: fix init-live.sh and use unionfsYang Shi2012-04-112-7/+30
| | | | | | | | | | | | | | | | | | [YOCTO #1487] When booting up with liveCD image, init scripts can't work well on read-only filesystem. Unionfs, which is supported in Yocto kernel, allows a filesystem to appear as writeable, but without actually allowing writes to change the filesystem. Use unionfs to mount rootfs and make root file system can be writen when using liveCD to boot up. Set UNION_FS variable depending on kernel config, so that it can work with kernel which doesn't have unionfs feature. [RP: Mark recipe as machine specific due to kernel dependency] (From OE-Core rev: b7f4e8d153c2aebbcf6556e7e926f6b94801d6aa) Signed-off-by: Yang Shi <yang.shi@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: add sleep to avoid kernel messages before install messageSaul Wold2011-12-081-0/+3
| | | | | | | | | | | As suggested by Darren Hart [YOCTO #725] (From OE-Core rev: ed76654c613d38095f085640acb6591b9739a60e) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-framework: provides a modular initramfsOtavio Salvador2011-12-087-0/+401
| | | | | | | | | | | | | | | | | | | | Provides the API and modules for a modular initramfs. The currently included modules are: * initramfs-module-debug adds support to dynamic debugging of initramfs using bootparams * initramfs-module-udev: enables udev usage * initramfs-module-mdev: enables mdev usage * initramfs-module-e2fs: adds support for ext4, ext3 and ext2 filesystems (From OE-Core rev: 7b69ad2167a1f0e57db82817b98a0cbcb70a0dd3) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-boot: make it more generic and easy to useOtavio Salvador2011-10-142-13/+22
| | | | | | | | | | | | | | | | | | | | The script was making some assumptions that enforced many requirement in the machine kernel configuration and usage, besides it were too while booting. Changes included: * fix indentation; * rdepends on udev; * allow use of isofs as module; * remove rootdelay param parsing as it was unused; * don't verbosely kill udevd and mknod; * mount devtmpfs into rootfs, if available, before swithing root; (From OE-Core rev: 3fc8cec53038f41d31344040c56d62aac90ba7e0) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Set an explicit path for the initrd scriptsDarren Hart2011-09-166-4/+10
| | | | | | | | | | | | | | | | If we don't set PATH, then the shell will specify one for us. Busybox adds the sbin dirs, but bash does not. I hit an issue where bash (among other things) ended up in my initrd and the boot scripts failed due to a bad default PATH. While that is a separate issue, we should not be at the mercy of the shell's default PATH. Update the initrdscripts to all specify: PATH=/sbin:/bin:/usr/sbin:/usr/bin (From OE-Core rev: 4617ae0f433876037c2c9a0dfdb5e373e7a5c77b) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-install: add PN to RDEPENDSTom Zanussi2011-09-161-1/+1
| | | | | | | | | RDEPENDS is package-specific, so add ${PN} to it. (From OE-Core rev: ac3373f5baefd5ac5fea7d7f68690bf0f0889be6) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-install: add support for grub2Tom Zanussi2011-09-152-11/+28
| | | | | | | | | | | | grub2 needs a different set of install steps from grub 0.97. This adds them to init-install.sh and adds an install-time check that determines which version is being used and which steps to use depending on the version of grub selected. (From OE-Core rev: c67d03eb3684acab89e5972609e397087727e74e) Signed-off-by: Tom Zanussi <tom.zanussi@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initramfs-live-install: Be consistent with grub.Lianhao Lu2011-09-071-1/+2
| | | | | | | | | | | [YOCTO #1428] Because the underlying grub 0.97 the initramfs-live-install RDEPDNEDS on only supports 32bit x86 target, set the COMPATIBLE_HOST accordingly. (From OE-Core rev: d128b4f2746ee8525352ce982a9c2a5e422630f2) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* initrdscripts: fix init-live.sh for hddimg and livecdJingdong Lu2011-08-242-7/+12
| | | | | | | | | | | Both hddimg and livecd use init-live.sh script to boot the rootfs.img. But the paths of rootfs.img in hddimg and livecd are different. So we add a variable "ISOLINUX" to provide a correct path. (From OE-Core rev: 4e7221d23bf335cbb4e1e2ba703e4c0a04df7129) Signed-off-by: Jingdong Lu <jingdong.lu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>