Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TARDIS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osak
TARDIS
Commits
ad5f6e35
Commit
ad5f6e35
authored
3 years ago
by
Valentin Bruch
Browse files
Options
Downloads
Patches
Plain Diff
image for LIP WS21: 2 kubuntu versions
grub template can now include multiple images
parent
85e0feff
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
assemble_image.sh
+17
-20
17 additions, 20 deletions
assemble_image.sh
grub_config.sh
+11
-8
11 additions, 8 deletions
grub_config.sh
grub_template.cfg
+26
-68
26 additions, 68 deletions
grub_template.cfg
packages
+2
-4
2 additions, 4 deletions
packages
with
56 additions
and
100 deletions
assemble_image.sh
+
17
−
20
View file @
ad5f6e35
...
@@ -3,43 +3,39 @@
...
@@ -3,43 +3,39 @@
set
-e
set
-e
set
-x
set
-x
# TODO update image file names
image_size
=
"6400M"
image_size
=
"7G"
img1
=
"kubuntu-20.04.3-desktop-amd64.iso"
kubuntu
=
"focal-desktop-amd64.iso"
img2
=
"kubuntu-21.10-desktop-amd64.iso"
xubuntu
=
"focal-desktop-amd64.iso"
bootimg
=
"
$img1
"
old_buntu
=
"
$kubuntu
"
:
${
workspace
:
=
"/workspace"
}
:
${
workspace
:
=
"/workspace"
}
# mtools, ddrescure, fdisk, grub, 7z
# mtools, ddrescure, fdisk, grub, 7z
rm
-rf
"
$workspace
/part_files"
rm
-rf
"
$workspace
/part_files"
mkdir
-p
"
$workspace
/part_files"
mkdir
-p
"
$workspace
/part_files"
git
-C
"
$workspace
/part_files"
clone
-b
tardis https://git.fsmpi.rwth-aachen.de/osak/lipstick.git
.
# copy only relevant files
git
-C
"
$workspace
/part_files"
clone
--depth
1
--single-branch
--branch
tardis https://git.fsmpi.rwth-aachen.de/osak/lipstick.git
.
rsync
-av
/usr/lib/grub/i386-efi
"
$workspace
/part_files"
/grub
rsync
-av
/usr/lib/grub/i386-efi
"
$workspace
/part_files"
/grub
rsync
-av
/usr/lib/grub/i386-pc
"
$workspace
/part_files"
/grub
rsync
-av
/usr/lib/grub/i386-pc
"
$workspace
/part_files"
/grub
rsync
-av
/usr/share/grub/themes
"
$workspace
/part_files"
/grub
rsync
-av
/usr/share/grub/themes
"
$workspace
/part_files"
/grub
mkdir
-p
"
$workspace
/part_files"
/grub/fonts/
mkdir
-p
"
$workspace
/part_files"
/grub/fonts/
rsync
-av
/usr/share/grub/unicode.pf2
"
$workspace
/part_files"
/grub/fonts/
rsync
-av
/usr/share/grub/unicode.pf2
"
$workspace
/part_files"
/grub/fonts/
7z x
"
$
old_buntu
"
-o
"
$workspace
/part_files"
EFI/
7z x
"
$
bootimg
"
-o
"
$workspace
/part_files"
EFI/
7z x
"
$
old_buntu
"
-o
"
$workspace
/part_files"
boot/grub/x86_64-efi
7z x
"
$
bootimg
"
-o
"
$workspace
/part_files"
boot/grub/x86_64-efi
mv
"
$workspace
/part_files"
/grub/
*
"
$workspace
/part_files"
/boot/grub/
mv
"
$workspace
/part_files"
/grub/
*
"
$workspace
/part_files"
/boot/grub/
rm
-rf
"
$workspace
/part_files"
/grub
rm
-rf
"
$workspace
/part_files"
/grub
rsync
--size-only
--checksum
"
$
kubuntu
"
"
$workspace
/part_files/"
rsync
--copy-links
--size-only
--checksum
"
$
img1
"
"
$workspace
/part_files/"
rsync
--size-only
--checksum
"
$
xubuntu
"
"
$workspace
/part_files/"
rsync
--copy-links
--size-only
--checksum
"
$
img2
"
"
$workspace
/part_files/"
source
./grub_config.sh
# functions to fill grub_template.cfg
source
./grub_config.sh
# functions to fill grub_template.cfg
cp
grub_template.cfg
"
$workspace
/part_files/boot/grub/grub.cfg"
cp
grub_template.cfg
"
$workspace
/part_files/boot/grub/grub.cfg"
fill_grub_config_template
"
$kubuntu
"
"KDE"
"
$workspace
/part_files/boot/grub/grub.cfg"
fill_grub_config_template
"
$img1
"
"
$workspace
/part_files/boot/grub/grub.cfg"
fill_grub_config_template
"
$xubuntu
"
"XFCE"
"
$workspace
/part_files/boot/grub/grub.cfg"
fill_grub_config_template
"
$img2
"
"
$workspace
/part_files/boot/grub/grub.cfg"
# TODO update kernel urls
#./create_offlinerepo.sh "$workspace/part_files/archives" "$img1" $(grep '^[^#]' packages | cut -d'|' -f 2)
wget
-nc
-P
"
$workspace
/part_files/"
"https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.6-rc4/linux-headers-5.6.0-050600rc4-generic_5.6.0-050600rc4.202003012332_amd64.deb"
#./create_offlinerepo.sh "$workspace/part_files/archives" "$img2" $(grep '^[^#]' packages | cut -d'|' -f 2)
wget
-nc
-P
"
$workspace
/part_files/"
"https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.6-rc4/linux-image-unsigned-5.6.0-050600rc4-generic_5.6.0-050600rc4.202003012332_amd64.deb"
wget
-nc
-P
"
$workspace
/part_files/"
"https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.6-rc4/linux-modules-5.6.0-050600rc4-generic_5.6.0-050600rc4.202003012332_amd64.deb"
./create_offlinerepo.sh
"
$workspace
/part_files/archives"
"
$kubuntu
"
$(
grep
'^[^#]'
packages |
cut
-d
'|'
-f
2
)
./create_offlinerepo.sh
"
$workspace
/part_files/archives"
"
$xubuntu
"
$(
grep
'^[^#]'
packages |
cut
-d
'|'
-f
2
)
cp
packages
"
$workspace
/part_files/packages"
cp
packages
"
$workspace
/part_files/packages"
echo
"ubiquity ubiquity/keep-installed string
$(
grep
'^[^#]'
packages |
cut
-d
'|'
-f
2 |
tr
'\n'
' '
)
"
>>
"
$workspace
/part_files/preseed/lip.seed"
echo
"ubiquity ubiquity/keep-installed string
$(
grep
'^[^#]'
packages |
cut
-d
'|'
-f
2 |
tr
'\n'
' '
)
"
>>
"
$workspace
/part_files/preseed/lip.seed"
...
@@ -47,9 +43,10 @@ rm -f "$workspace/part.img"
...
@@ -47,9 +43,10 @@ rm -f "$workspace/part.img"
truncate
-s
"
$image_size
"
"
$workspace
/part.img"
truncate
-s
"
$image_size
"
"
$workspace
/part.img"
mkfs.vfat
-n
"LIPSTICK"
"
$workspace
/part.img"
mkfs.vfat
-n
"LIPSTICK"
"
$workspace
/part.img"
MTOOLS_SKIP_CHECK
=
1 mcopy
-i
"
$workspace
/part.img"
-b
-s
-v
"
$workspace
/part_files"
/
*
"
$workspace
/part_files"
/.git ::
MTOOLS_SKIP_CHECK
=
1 mcopy
-i
"
$workspace
/part.img"
-b
-s
-v
"
$workspace
/part_files"
/
*
"
$workspace
/part_files"
/.git ::
rm
-rf
"
$workspace
/part_files"
grub-mkimage
--prefix
"(hd0,msdos1)/boot/grub"
--output
"
$workspace
/grub.i386-pc.img"
--format
"i386-pc"
part_msdos fat ext2 biosdisk
grub-mkimage
--prefix
"(hd0,msdos1)/boot/grub"
--output
"
$workspace
/grub.i386-pc.img"
--format
"i386-pc"
part_msdos fat ext2 biosdisk
dd
if
=
/usr/lib/grub/i386-pc/boot.img
of
=
"
$workspace
/output.img"
bs
=
446
count
=
1
dd
if
=
/usr/lib/grub/i386-pc/boot.img
of
=
"
$workspace
/output.img"
bs
=
446
count
=
1
dd
if
=
"
$workspace
/grub.i386-pc.img"
of
=
"
$workspace
/output.img"
bs
=
512
seek
=
1
dd
if
=
"
$workspace
/grub.i386-pc.img"
of
=
"
$workspace
/output.img"
bs
=
512
seek
=
1
ddrescue
--output-position
=
2048s
--sparse
"
$workspace
/part.img"
"
$workspace
/output.img"
ddrescue
--output-position
=
2048s
--sparse
"
$workspace
/part.img"
"
$workspace
/output.img"
printf
"label: dos
\n
unit: sectors
\n
2048,+,b,*
\n
"
| sfdisk
"
$workspace
/output.img"
printf
"label: dos
\n
unit: sectors
\n
2048,+,b,*
\n
"
| sfdisk
"
$workspace
/output.img"
echo
"Used
$(
du
-s
-h
"
$workspace
/
part_files
"
|
cut
-f1
)
of
${
image_size
}
"
echo
"Used
$(
du
-s
-h
"
$workspace
/
output.img
"
|
cut
-f1
)
of
${
image_size
}
"
This diff is collapsed.
Click to expand it.
grub_config.sh
+
11
−
8
View file @
ad5f6e35
...
@@ -25,16 +25,19 @@ function extract_release() {
...
@@ -25,16 +25,19 @@ function extract_release() {
function
fill_grub_config_template
()
{
function
fill_grub_config_template
()
{
iso_file
=
"
$1
"
iso_file
=
"
$1
"
distribution_grep
=
"
$2
"
# KDE / XFCE
sed_target
=
"
$2
"
sed_target
=
"
$3
"
# copy template line and remove #TEMPLATE\s* in copied line
sed
"s|__
${
distribution_grep
}
_KERNEL__|
$(
extract_kernel
"
$iso_file
"
)
|g"
-i
"
$sed_target
"
sed
's|^#TEMPLATE\s*\(.*\)|\1\n&|g'
-i
"
$sed_target
"
sed
"s|__
${
distribution_grep
}
_INITRD__|
$(
extract_initrd
"
$iso_file
"
)
|g"
-i
"
$sed_target
"
# replace only matches in lines which are not commented out
sed
"s|__
${
distribution_grep
}
_RELEASE__|
$(
extract_release
"
$iso_file
"
)
|g"
-i
"
$sed_target
"
sed
"/^#/!s|__KERNEL__|
$(
extract_kernel
"
$iso_file
"
)
|g"
-i
"
$sed_target
"
sed
"s|__
${
distribution_grep
}
_ISONAME__|
$iso_file
|g"
-i
"
$sed_target
"
sed
"/^#/!s|__INITRD__|
$(
extract_initrd
"
$iso_file
"
)
|g"
-i
"
$sed_target
"
sed
"/^#/!s|__RELEASE__|
$(
extract_release
"
$iso_file
"
)
|g"
-i
"
$sed_target
"
sed
"/^#/!s|__ISONAME__|
$iso_file
|g"
-i
"
$sed_target
"
}
}
# image flavors to put in the grub config
# image flavors to put in the grub config
# usage after sourcing (modifies grub_template_copy.cfg)
# usage after sourcing (modifies grub_template_copy.cfg)
# cp grub_template.cfg grub_template_copy.cfg
# cp grub_template.cfg grub_template_copy.cfg
# fill_grub_config_template "kubuntu-18.04.1-desktop-amd64.iso" "KDE" "grub_template_copy.cfg"
# fill_grub_config_template "kubuntu-18.04.1-desktop-amd64.iso" "grub_template_copy.cfg"
# fill_grub_config_template "xubuntu-18.04.1-desktop-amd64.iso" "XFCE" "grub_template_copy.cfg"
# fill_grub_config_template "xubuntu-18.04.1-desktop-amd64.iso" "grub_template_copy.cfg"
# Boot entries for images appear in the same order as they are generated.
This diff is collapsed.
Click to expand it.
grub_template.cfg
+
26
−
68
View file @
ad5f6e35
...
@@ -13,95 +13,53 @@ color yellow/black white/red
...
@@ -13,95 +13,53 @@ color yellow/black white/red
set
pager
=
1
set
pager
=
1
set
gfxpayload
=
keep
set
gfxpayload
=
keep
function
kde_L
oadCasper
{
function
l
oadCasper
{
loopback
loop
($root)/${
kde_
isoname}
loopback
loop
($root)/${isoname}
echo
"Loading
kernel"
echo
"Loading
kernel"
linux
(loop)
__KDE_KERNEL__
boot
=
casper file=/isodevice/preseed/lip.seed ${cmdline} iso-scan/filename=/
__KDE_ISONAME__
sysrq_always_enabled pstore.pstore_disable nosplash verbose --
linux
(loop)
${kernel}
boot
=
casper file=/isodevice/preseed/lip.seed ${cmdline} iso-scan/filename=/
${isoname}
sysrq_always_enabled pstore.pstore_disable nosplash verbose --
echo
"Loading
initrd"
echo
"Loading
initrd"
initrd
(loop)
__KDE_INITRD__
initrd
(loop)
${initrd}
echo
"Starting
kernel"
echo
"Starting
kernel"
}
}
function
kde_menu
{
# Arguments: RELEASE ISONAME KERNEL INITRD
menuentry
"Empfohlen:
${kde_release}
(deutsch)"
{
function
img_menu
{
set
release
=
"$1"
set
isoname
=
"$2"
set
kernel
=
"$3"
set
initrd
=
"$4"
menuentry
"Empfohlen:
${release}
(deutsch)"
{
set
cmdline
=
"debian-installer/language=de keyboard-configuration/layoutcode?=de"
set
cmdline
=
"debian-installer/language=de keyboard-configuration/layoutcode?=de"
kde_L
oadCasper
l
oadCasper
}
}
menuentry
"Recommended:
${
kde_
release}
(english)"
{
menuentry
"Recommended:
${release}
(english)"
{
set
cmdline
=
""
set
cmdline
=
""
kde_L
oadCasper
l
oadCasper
}
}
menuentry
"${
kde_
release}
(deutsch,
failsafe)"
{
menuentry
"${release}
(deutsch,
failsafe)"
{
set
cmdline
=
"debian-installer/locale=de_DE console-setup/layoutcode=de nomodeset noplymouth nosplash verbose text noacpi"
set
cmdline
=
"debian-installer/locale=de_DE console-setup/layoutcode=de nomodeset noplymouth nosplash verbose text noacpi"
kde_L
oadCasper
l
oadCasper
}
}
menuentry
"${
kde_
release}
(english,
failsafe)"
{
menuentry
"${release}
(english,
failsafe)"
{
set
cmdline
=
"nomodeset noplymouth nosplash verbose text noacpi"
set
cmdline
=
"nomodeset noplymouth nosplash verbose text noacpi"
kde_L
oadCasper
l
oadCasper
}
}
menuentry
"${
kde_
release}
(deutsch,
ohne
LIPNSA)"
{
menuentry
"${release}
(deutsch,
ohne
LIPNSA)"
{
set
cmdline
=
"debian-installer/locale=de_DE console-setup/layoutcode=de fnord"
set
cmdline
=
"debian-installer/locale=de_DE console-setup/layoutcode=de fnord"
kde_L
oadCasper
l
oadCasper
}
}
menuentry
"${
kde_
release}
(english,
without
LIPNSA)"
{
menuentry
"${release}
(english,
without
LIPNSA)"
{
set
cmdline
=
"fnord"
set
cmdline
=
"fnord"
kde_L
oadCasper
l
oadCasper
}
}
}
}
function
xfce_LoadCasper
{
#TEMPLATE img_menu "__RELEASE__" "__ISONAME__" "__KERNEL__" "__INITRD__"
loopback
loop
($root)/${xfce_isoname}
echo
"Loading
kernel"
linux
(loop)__XFCE_KERNEL__
boot
=
casper file=/isodevice/preseed/lip.seed ${cmdline} iso-scan/filename=/__XFCE_ISONAME__ sysrq_always_enabled pstore.pstore_disable nosplash verbose --
echo
"Loading
initrd"
initrd
(loop)__XFCE_INITRD__
echo
"Starting
kernel"
}
function
xfce_menu
{
menuentry
"Empfohlen:
${xfce_release}
(deutsch)"
{
set
cmdline
=
"debian-installer/language=de keyboard-configuration/layoutcode?=de"
xfce_LoadCasper
}
menuentry
"Recommended:
${xfce_release}
(english)"
{
set
cmdline
=
""
xfce_LoadCasper
}
menuentry
"${xfce_release}
(deutsch,
failsafe)"
{
set
cmdline
=
"debian-installer/locale=de_DE console-setup/layoutcode=de nomodeset noplymouth nosplash verbose text noacpi"
xfce_LoadCasper
}
menuentry
"${xfce_release}
(english,
failsafe)"
{
set
cmdline
=
"nomodeset noplymouth nosplash verbose text noacpi"
xfce_LoadCasper
}
menuentry
"${xfce_release}
(deutsch,
ohne
LIPNSA)"
{
set
cmdline
=
"debian-installer/locale=de_DE console-setup/layoutcode=de fnord"
xfce_LoadCasper
}
menuentry
"${xfce_release}
(english,
without
LIPNSA)"
{
set
cmdline
=
"fnord"
xfce_LoadCasper
}
}
set
kde_release
=
"__KDE_RELEASE__"
set
kde_isoname
=
"__KDE_ISONAME__"
kde_menu
set
xfce_release
=
"__XFCE_RELEASE__"
set
xfce_isoname
=
"__XFCE_ISONAME__"
xfce_menu
menuentry
"Show
bootflags"
{
menuentry
"Show
bootflags"
{
cat
"/bootflags.txt"
cat
"/bootflags.txt"
...
...
This diff is collapsed.
Click to expand it.
packages
+
2
−
4
View file @
ad5f6e35
...
@@ -43,8 +43,8 @@ L |ubiquity|
...
@@ -43,8 +43,8 @@ L |ubiquity|
#Desktop stuff for Kubuntu
#Desktop stuff for Kubuntu
C |thunderbird|Thunderbird: E-Mail-Client
C |thunderbird|Thunderbird: E-Mail-Client
c
|
kile|kile
: Graphischer LaTeX-Editor
C
|
texstudio|texstudio
: Graphischer LaTeX-Editor
C
|
texstudio|texstudio: Schlanker
er graphischer LaTeX-Editor
c
|
kile|kile: Alternativ
er graphischer LaTeX-Editor
D |ffmpeg|
D |ffmpeg|
D |hunspell|
D |hunspell|
D |vlc|
D |vlc|
...
@@ -73,8 +73,6 @@ LD |vim|
...
@@ -73,8 +73,6 @@ LD |vim|
LD |htop|
LD |htop|
LD |git|
LD |git|
LD |gparted|
LD |gparted|
# libcurl4 is not installed in Xubuntu in the installed system.
D |libcurl4|
#texlive
#texlive
C |texlive-lang-english texlive-bibtex-extra tipa texlive-latex-extra texlive-xetex texlive-latex-base chktex texlive-latex-recommended texlive-lang-german texlive-fonts-recommended psutils texlive-extra-utils texlive-font-utils latexmk texlive-pstricks feynmf texlive-science texlive-pictures texlive-metapost latexdiff tex-gyre texlive-publishers texlive-base lmodern texlive-luatex texlive-binaries|LaTeX mit vielen Paketen für wissenschaftliche Arbeiten
C |texlive-lang-english texlive-bibtex-extra tipa texlive-latex-extra texlive-xetex texlive-latex-base chktex texlive-latex-recommended texlive-lang-german texlive-fonts-recommended psutils texlive-extra-utils texlive-font-utils latexmk texlive-pstricks feynmf texlive-science texlive-pictures texlive-metapost latexdiff tex-gyre texlive-publishers texlive-base lmodern texlive-luatex texlive-binaries|LaTeX mit vielen Paketen für wissenschaftliche Arbeiten
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment