diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-12-03 10:43:32 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-12-03 10:43:32 +0000 |
commit | 547603a359aa1fd2ba69c8dcb0cddeecd6d5a169 (patch) | |
tree | f63a806e827b8ba681fbcbfca90cb01abccbcb18 | |
parent | a800358ceff81134a2538e50298eaff240dbcc94 (diff) | |
download | alpine-conf-547603a359aa1fd2ba69c8dcb0cddeecd6d5a169.tar.bz2 alpine-conf-547603a359aa1fd2ba69c8dcb0cddeecd6d5a169.tar.xz |
setup-disk: pass nomodeset boot option
-rw-r--r-- | setup-disk.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/setup-disk.in b/setup-disk.in index bae373a..f4401dd 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -185,6 +185,15 @@ cleanup_chroot_mounts() { done } +has_bootopt() { + local opt="$1" + set -- $(cat /proc/cmdline) + for i; do + [ "$i" = "$opt" ] && return 0 + done + return 1 +} + install_mounted_root() { local mnt="$1" mnt_boot= boot_fs= root_fs= local initfs_features="ata base ide scsi usb virtio" @@ -275,6 +284,9 @@ install_mounted_root() { if is_vmware; then kernel_opts="pax_nouderef $kernel_opts" fi + if has_bootopt nomodeset; then + kernel_opts="nomodeset $kernel_opts" + fi modules="sd-mod,usb-storage,${root_fs}${raidmod}" sed -e "s:^root=.*:root=$root:" \ -e "s:^default_kernel_opts=.*:default_kernel_opts=\"$kernel_opts\":" \ |