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
61
Issues
61
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
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
36879e37
Commit
36879e37
authored
Feb 09, 2019
by
Matti Hyttinen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixes-20190209' into 'master'
Fixes 20190209 See merge request
!251
parents
fd0c4321
4263a5cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
14 deletions
+18
-14
lib/util-base.sh
lib/util-base.sh
+10
-10
lib/util-disk.sh
lib/util-disk.sh
+8
-4
No files found.
lib/util-base.sh
View file @
36879e37
...
...
@@ -399,19 +399,19 @@ install_grub_uefi() {
# grub config changes for zfs root
if
[
$(
findmnt
-ln
-o
FSTYPE
${
MOUNTPOINT
}
)
==
"zfs"
]
;
then
# zfs is considered a sparse filesystem so we can't use SAVEDEFAULT
sed
-e
'/GRUB_SAVEDEFAULT/ s/^#*/#/'
-i
${
MOUNTPOINT
}
/etc/default/grub
# we need to tell grub where the zfs root is
ZFS_PARAM
=
"zfs=
$(
findmnt
-ln
-o
SOURCE
${
MOUNTPOINT
}
)
rw"
sed
-e
'/^GRUB_CMDLINE_LINUX_DEFAULT=/s@"$@ '
"
${
ZFS_PARAM
}
"
'"@g'
-e
'/^GRUB_CMDLINE_LINUX=/s@"$@ '
"
${
ZFS_PARAM
}
"
'"@g'
-i
${
MOUNTPOINT
}
/etc/default/grub
# zfs needs ZPOOL_VDEV_NAME_PATH set to properly find the device
echo
ZPOOL_VDEV_NAME_PATH
=
YES
>>
${
MOUNTPOINT
}
/etc/environment
export
ZPOOL_VDEV_NAME_PATH
=
YES
# there has to be a better way to do this
echo
-e
"# "
'!'
"/bin/bash
ln -s /hostlvm /run/lvm
pacman -S --noconfirm --needed grub efibootmgr dosfstools grub-btrfs
export ZPOOL_VDEV_NAME_PATH=YES
pacman -S --noconfirm --needed grub efibootmgr dosfstools
# zfs is considered a sparse filesystem so we can't use SAVEDEFAULT
sed -e '/GRUB_SAVEDEFAULT/ s/^#*/#/' -i /etc/default/grub
# we need to tell grub where the zfs root is
zroot=
\"
zfs=
$(
findmnt
-ln
-o
SOURCE
${
MOUNTPOINT
}
)
rw
\"
sed -e '/^GRUB_CMDLINE_LINUX_DEFAULT=/s@
\"\$
@ '
\"\$
{zroot}
\"
'
\"
@g' -e '/^GRUB_CMDLINE_LINUX=/s@
\"\$
@ '
\"\$
{zroot}
\"
'
\"
@g' -i /etc/default/grub
sed -e '/GRUB_SAVEDEFAULT/ s/^#*/#/' -i /etc/default/grub
grub-install --target=x86_64-efi --efi-directory=
${
UEFI_MOUNT
}
--bootloader-id=
${
bootid
}
--recheck
pacman -S --noconfirm grub-theme-manjaro"
>
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
else
...
...
@@ -438,7 +438,7 @@ pacman -S --noconfirm grub-theme-manjaro" > ${MOUNTPOINT}/usr/bin/grub_installer
arch_chroot
"grub_installer.sh"
2>
$ERR
check_for_error
"grub-install --target=x86_64-efi"
$?
umount /mnt/hostlvm
# the grub_installer is no longer needed
- there still needs to be a better way to do this
# the grub_installer is no longer needed
[[
-f
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
]]
&&
rm
${
MOUNTPOINT
}
/usr/bin/grub_installer.sh
# Ask if user wishes to set Grub as the default bootloader and act accordingly
...
...
@@ -610,8 +610,8 @@ bios_bootloader() {
# zfs is considered a sparse filesystem so we can't use SAVEDEFAULT
sed
-e
'/GRUB_SAVEDEFAULT/ s/^#*/#/'
-i
${
MOUNTPOINT
}
/etc/default/grub
# we need to tell grub where the zfs root is
ZFS_PARAM
=
"zfs=
$(
findmnt
-ln
-o
SOURCE
${
MOUNTPOINT
}
)
rw"
sed
-e
'/^GRUB_CMDLINE_LINUX_DEFAULT=/s@"$@ '
"
${
ZFS_PARAM
}
"
'"@g'
-e
'/^GRUB_CMDLINE_LINUX=/s@"$@ '
"
${
ZFS_PARAM
}
"
'"@g'
-i
${
MOUNTPOINT
}
/etc/default/grub
zroot
=
"zfs=
$(
findmnt
-ln
-o
SOURCE
${
MOUNTPOINT
}
)
rw"
sed
-e
'/^GRUB_CMDLINE_LINUX_DEFAULT=/s@"$@ '
"
${
zroot
}
"
'"@g'
-e
'/^GRUB_CMDLINE_LINUX=/s@"$@ '
"
${
zroot
}
"
'"@g'
-i
${
MOUNTPOINT
}
/etc/default/grub
# zfs needs ZPOOL_VDEV_NAME_PATH set to properly find the device
echo
ZPOOL_VDEV_NAME_PATH
=
YES
>>
${
MOUNTPOINT
}
/etc/environment
export
ZPOOL_VDEV_NAME_PATH
=
YES
...
...
lib/util-disk.sh
View file @
36879e37
...
...
@@ -442,8 +442,12 @@ mount_current_partition() {
}
make_swap
()
{
# Ask user to select partition or create swapfile
DIALOG
"
$_PrepMntPart
"
--menu
"
\n
$_SelSwpBody
\n
"
0 0 12
"
$_SelSwpNone
"
$"-"
"
$_SelSwpFile
"
$"-"
${
PARTITIONS
}
2>
${
ANSWER
}
||
return
0
# Ask user to select partition or create swapfile if swapfiles are valid for the root filesystem
if
[[
$(
findmnt
-ln
-o
FSTYPE
${
MOUNTPOINT
}
)
==
"zfs"
||
$(
findmnt
-ln
-o
FSTYPE
${
MOUNTPOINT
}
)
==
"btrfs"
]]
;
then
DIALOG
"
$_PrepMntPart
"
--menu
"
\n
$_SelSwpBody
\n
"
0 0 12
"
$_SelSwpNone
"
$"-"
${
PARTITIONS
}
2>
${
ANSWER
}
||
return
0
else
DIALOG
"
$_PrepMntPart
"
--menu
"
\n
$_SelSwpBody
\n
"
0 0 12
"
$_SelSwpNone
"
$"-"
"
$_SelSwpFile
"
$"-"
${
PARTITIONS
}
2>
${
ANSWER
}
||
return
0
fi
if
[[
$(
cat
${
ANSWER
}
)
!=
"
$_SelSwpNone
"
]]
;
then
PARTITION
=
$(
cat
${
ANSWER
}
)
...
...
@@ -1048,7 +1052,7 @@ zfs_new_ds() {
DIALOG
"
$_zfsDSMenuNameTitle
"
--inputbox
"
\n
$zfsmenubody
\n
"
0 0
""
2>
${
ANSWER
}
||
return
1
# validation
[[
!
$(
cat
${
ANSWER
}
)
=
~ ^[a-zA-Z][a-zA-Z0-9.:_-]
*
$
]]
&&
zfsmenubody
=
$_zfsZpoolCValidation1
||
loopmenu
=
0
[[
!
$(
cat
${
ANSWER
}
)
=
~ ^[a-zA-Z][a-zA-Z0-9.:
/
_-]
*
$
]]
&&
zfsmenubody
=
$_zfsZpoolCValidation1
||
loopmenu
=
0
done
local
zname
=
$(
cat
${
ANSWER
}
)
...
...
@@ -1081,7 +1085,7 @@ zfs_new_ds() {
# validation
[[
$(
findmnt
-n
${
MOUNTPOINT
}
/
${
zmount
}
)
]]
&&
zfsmenubody
=
$_zfsMountMenuInUse
[[
!
$zmount
=
~ ^/
]]
&&
zfsmenubody
=
$_zfsMountMenuNotValid
[[
!
(
$zmount
=
~ ^/
||
$zmount
==
none
)
]]
&&
zfsmenubody
=
$_zfsMountMenuNotValid
[[
$zfsmenubody
==
$_zfsMountMenuBody
]]
&&
loopmenu
=
0
done
...
...
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