Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
manjaro-architect
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
63
Issues
63
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Applications
manjaro-architect
Commits
d4125f65
Commit
d4125f65
authored
Feb 15, 2019
by
Matti Hyttinen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement grub workaround in legacy-boot
parent
413d6cf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
6 deletions
+26
-6
lib/util-base.sh
lib/util-base.sh
+26
-6
No files found.
lib/util-base.sh
View file @
d4125f65
...
@@ -578,7 +578,7 @@ bios_bootloader() {
...
@@ -578,7 +578,7 @@ bios_bootloader() {
# If something has been selected, act
# If something has been selected, act
if
[[
$(
cat
${
PACKAGES
}
)
!=
""
]]
;
then
if
[[
$(
cat
${
PACKAGES
}
)
!=
""
]]
;
then
sed
-i
's/+ \|\"//g'
${
PACKAGES
}
sed
-i
's/+ \|\"//g'
${
PACKAGES
}
basestrap
${
MOUNTPOINT
}
$(
cat
${
PACKAGES
}
)
2>
$ERR
#
basestrap ${MOUNTPOINT} $(cat ${PACKAGES}) 2>$ERR
check_for_error
"
$FUNCNAME
"
$?
||
return
1
check_for_error
"
$FUNCNAME
"
$?
||
return
1
# If Grub, select device
# If Grub, select device
...
@@ -615,16 +615,34 @@ bios_bootloader() {
...
@@ -615,16 +615,34 @@ bios_bootloader() {
# zfs needs ZPOOL_VDEV_NAME_PATH set to properly find the device
# zfs needs ZPOOL_VDEV_NAME_PATH set to properly find the device
echo
ZPOOL_VDEV_NAME_PATH
=
YES
>>
${
MOUNTPOINT
}
/etc/environment
echo
ZPOOL_VDEV_NAME_PATH
=
YES
>>
${
MOUNTPOINT
}
/etc/environment
export
ZPOOL_VDEV_NAME_PATH
=
YES
export
ZPOOL_VDEV_NAME_PATH
=
YES
# there has to be a better way to do this
# there has to be a better way to do this $(cat ${PACKAGES})
echo
-e
"# "
'!'
"/bin/bash
\n
export ZPOOL_VDEV_NAME_PATH=YES
\n
grub-install --target=i386-pc --recheck
$DEVICE
"
>
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
echo
-e
"# "
'!'
"/bin/bash
ln -s /hostlvm /run/lvm
export ZPOOL_VDEV_NAME_PATH=YES
pacman -S --noconfirm --needed grub os-prober
grub-install --target=i386-pc --recheck
$DEVICE
pacman -S --noconfirm grub-theme-manjaro"
>
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
else
else
echo
-e
"# "
'!'
"/bin/bash
\n
grub-install --target=i386-pc --recheck
$DEVICE
"
>
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
echo
-e
"# "
'!'
"/bin/bash
ln -s /hostlvm /run/lvm
pacman -S --noconfirm --needed grub os-prober grub-btrfs
grub-install --target=i386-pc --recheck
$DEVICE
pacman -S --noconfirm grub-theme-manjaro"
>
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
fi
# If the root is on btrfs-subvolume, amend grub installation
if
!
$(
mount |
awk
'$3 == "/mnt" {print $0}'
|
grep
btrfs |
grep
-qv
subvolid
=
5
)
;
then
sed
-e
's/ grub-btrfs//g'
-i
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
fi
# Remove os-prober if not selected
if
!
cat
${
PACKAGES
}
|
grep
-q
os-prober
;
then
sed
-e
's/ os-prober//g'
-i
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
fi
fi
[[
-f
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
]]
&&
chmod
a+x
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
[[
-f
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
]]
&&
chmod
a+x
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
DIALOG
"
$_InstGrub
"
--infobox
"
\n
$_PlsWaitBody
\n
"
0 0
DIALOG
"
$_InstGrub
"
--infobox
"
\n
$_PlsWaitBody
\n
"
0 0
dd
if
=
/dev/zero
of
=
$DEVICE
seek
=
1
count
=
2047
dd
if
=
/dev/zero
of
=
$DEVICE
seek
=
1
count
=
2047
mkdir
/mnt/hostlvm
mount
--bind
/run/lvm /mnt/hostlvm
arch_chroot
"grub_installer.sh"
2>
$ERR
arch_chroot
"grub_installer.sh"
2>
$ERR
check_for_error
"grub-install --target=i386-pc"
$?
check_for_error
"grub-install --target=i386-pc"
$?
...
@@ -633,7 +651,7 @@ bios_bootloader() {
...
@@ -633,7 +651,7 @@ bios_bootloader() {
#grub_mkconfig
#grub_mkconfig
basestrap
${
MOUNTPOINT
}
grub-theme-manjaro 2>
$ERR
#
basestrap ${MOUNTPOINT} grub-theme-manjaro 2>$ERR
check_for_error
"
$FUNCNAME
grub"
$?
check_for_error
"
$FUNCNAME
grub"
$?
# For quiet grub, remove fsck
# For quiet grub, remove fsck
if
grep
"^HOOKS"
${
MOUNTPOINT
}
/etc/mkinitcpio.conf |
grep
-q
fsck
;
then
if
grep
"^HOOKS"
${
MOUNTPOINT
}
/etc/mkinitcpio.conf |
grep
-q
fsck
;
then
...
@@ -641,6 +659,8 @@ bios_bootloader() {
...
@@ -641,6 +659,8 @@ bios_bootloader() {
arch_chroot
"mkinitcpio -P"
arch_chroot
"mkinitcpio -P"
fi
fi
fi
fi
umount /mnt/hostlvm
rmdir
/mnt/hostlvm
else
else
# Syslinux
# Syslinux
DIALOG
"
$_InstSysTitle
"
--menu
"
\n
$_InstSysBody
\n
"
0 0 2
\
DIALOG
"
$_InstSysTitle
"
--menu
"
\n
$_InstSysBody
\n
"
0 0 2
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment