From f318fac487682bbaed76c05f9b57b6bdc37bdc84 Mon Sep 17 00:00:00 2001 From: user1 Date: Sun, 26 Jun 2022 14:34:15 +0200 Subject: [PATCH] [C] Change to fdisk (MBR) --- .gitignore | 1 + raspberry_arch-install.sh | 33 ++++++++++++++++++++++++++------- raspberry_arch-layout.MPT | 8 ++++++++ 3 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 raspberry_arch-layout.MPT diff --git a/.gitignore b/.gitignore index 1343b4f..53fe5f6 100755 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ xnee.xns out.txt boot root +ArchLinuxARM-rpi-armv7-latest.tar.gz diff --git a/raspberry_arch-install.sh b/raspberry_arch-install.sh index 773f1f9..6389967 100755 --- a/raspberry_arch-install.sh +++ b/raspberry_arch-install.sh @@ -8,16 +8,16 @@ if [[ $EUID -ne 0 ]]; then exit 0 fi -fdisk -l +sfdisk -l read -p "Welches Laufwerk soll beschrieben werden?: [/dev/sda|/dev/sdb] " device +[[ -z "${device}" ]] && echo "No device is set! Abort..." && exit 1 echo "Wipe Device ${device} ..." sleep 5 wipefs -a -f ${device} -sgdisk -o ${device} echo "Create new Partition type ..." @@ -26,15 +26,32 @@ sleep 5 bootpartitionnummer=1 rootpartitionnummer=2 -sgdisk -a 2048 -n ${bootpartitionnummer: -1}::+1024K -c ${bootpartitionnummer: -1}:"BIOS Boot Partition" -t ${bootpartitionnummer: -1}:ef02 ${device} -sgdisk -a 2048 -n ${rootpartitionnummer: -1}:: -c ${rootpartitionnummer: -1}:"Linux filesystem" -t ${rootpartitionnummer: -1}:8300 ${device} +fdisk /dev/sdd <