Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
initramfs-with-mca
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
nexedi
initramfs-with-mca
Commits
01dacd9b
Commit
01dacd9b
authored
May 13, 2022
by
Ophélie Gagnard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
installation/: Remove old.install.sh
parent
c5d25863
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
136 deletions
+0
-136
installation/old.install.sh
installation/old.install.sh
+0
-136
No files found.
installation/old.install.sh
deleted
100755 → 0
View file @
c5d25863
#!/bin/bash
set
-eux
# installing miscellaneous useful packages
apt
-y
install
make autopoint autoconf libtool libattr1-dev musl-tools mmv sbsigntool
# installing more necessary packages to activate Secure Boot with our own keys
apt
-y
install
efitools
# installing (download and compile)a specific version of python to make sure the whole installation process work
if
[
!
-d
"/opt/python-3.7.12/include/python3.7m"
]
;
then
wget https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tgz
tar
zxf Python-3.7.12.tgz
cd
Python-3.7.12/
./configure
--prefix
=
/opt/python-3.7.12
make
make
install
cd
..
fi
rm
-f
Python-3.7.12.tgz
rm
-rf
Python-3.7.12/
## Install dracut
if
!
which dracut
;
then
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut-core_051-1_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut_051-1_all.deb
wget http://ftp.us.debian.org/debian/pool/main/d/dracut/dracut-network_051-1_all.deb
apt
-y
install
./dracut-core_051-1_amd64.deb ./dracut_051-1_all.deb ./dracut-network_051-1_all.deb
rm
dracut
*
.deb
fi
#if [ ! -e "$HOME/.cargo/bin" ]; then
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
#fi
#export PATH=$PATH:$HOME/.cargo/bin
#rustup target add x86_64-unknown-linux-musl
## Install others
apt
-y
install
libssl-dev
# needed to build fmt library
apt
-y
install
cmake
## Install Go
# needed for dracut.module/ make install
GOVERSION
=
1.16.5
if
[
!
-e
"/usr/local/go/VERSION"
]
||
[
go
${
GOVERSION
}
!=
$(
cat
/usr/local/go/VERSION
)
]
;
then
wget https://golang.org/dl/go
${
GOVERSION
}
.linux-amd64.tar.gz
rm
-rf
/usr/local/go
tar
-C
/usr/local
-xzf
go
${
GOVERSION
}
.linux-amd64.tar.gz
rm
go
*
.tar.gz
*
# TODO: write in /etc/profile.d/ instead
echo
-e
"
\n
"
>>
/etc/profile
echo
'export PATH=$PATH:/usr/local/go/bin'
>>
/etc/profile
source
/etc/profile
fi
## Install Cython+
# needed for scan-filesystem/ make nopython
# WARNING: it does not differentiate Cython+ from Cython
if
!
which cython3
;
then
mkdir
-p
build_cythonplus
&&
cd
build_cythonplus
wget https://lab.nexedi.com/nexedi/cython/raw/debian/build_cythonplus
chmod
744 build_cythonplus
./build_cythonplus
apt
-y
install
./cython3_
*
cd
..
fi
## Install fmt library
# needed for scan-filesystem/ make nopython
if
[
!
-d
"fmt"
]
;
then
git clone https://github.com/fmtlib/fmt.git
cd fmt
&&
mkdir
-p
build_fmt
&&
cd
build_fmt
cmake
-DCMAKE_POSITION_INDEPENDENT_CODE
=
TRUE ..
make
make
install
cd
../..
fi
cd
dracut.module
make
install
cd
..
apt
-y
autoremove
echo
-e
'\nInstallation finished.\nType ^C (ctrl+C) to exit.\nType Enter to proceed to building the UEFI application.\n'
read
## Build UEFI application
if
[
!
-e
uefi-key
]
;
then
mkdir
uefi-key
cd
uefi-key
../mkkeys.sh
cd
..
fi
if
[
!
-e
/etc/uefi-key
]
;
then
mkdir
/etc/uefi-key
cp
uefi-key/DB.cer /etc/uefi-key/db.cer
cp
uefi-key/DB.crt /etc/uefi-key/db.crt
cp
uefi-key/DB.key /etc/uefi-key/db.key
fi
# TODO: write a separate script: one to install stuff, the other to build the UEFI application
:
'
# creates the keys needed to sign the UEFI application if they do not exist
# when creating and copying (or simply copying) the keys in /etc/uefi-key/ by hand,
# the following lines wont be executed
if [ ! -e /etc/uefi-key/db.crt ]; then
openssl req -newkey rsa:2048 -nodes -keyout /etc/uefi-key/db.key -new -x509 -sha256 -days 36500 -subj "/CN=TEST" -out /etc/uefi-key/db.crt
openssl x509 -outform DER -in /etc/uefi-key/db.crt -out /etc/uefi-key/db.cer
fi
#'
#source secure-boot-automation.sh
rm
-rf
dracut_tmp
mkdir
dracut_tmp
disk_info
=
$(
/sbin/fdisk
-l
|
grep
'^/dev'
|
cut
-d
' '
-f1
)
disk_info_list
=(
${
disk_info
//
' '
/
}
)
/sbin/e2label
${
disk_info_list
[4]
}
ROOT
rm
-rf
/boot/efi/EFI/Linux/
*
#mmv '/boot/efi/EFI/Linux/*.*' '/boot/efi/EFI/Linux/#1_1.#2'
dracut
--force
-c
./dracut.module/dracut.conf
--confdir
dracut_tmp
cp
-r
/boot/efi/EFI /EFI
#maybe not necessary
cp
/etc/uefi-key/db.cer /EFI/db.cer
cp
/etc/uefi-key/db.cer /boot/efi/db.cer
uefi
=
$(
ls
/EFI/Linux
)
efibootmgr
--quiet
--create
--disk
${
disk_info_list
[3]
}
--label
'debian UEFI test_root'
--loader
/EFI/Linux/
$uefi
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