"Arch By Hand" UEFI GPT SSD LUKS Install Script

Arch UEFI GPT LUKS (and non LUKS version) Automated Install Example Script, SSD friendly
Please note that if you're going to use this you're going to have to a) customize it to fit your needs and b) know what system config you need to do post install (rc.* etc). It's a jumping off point.
Want to put in a lot of effort just to get Arch Linux listed in your "bios" startup options? You're in the right post! Well, it's more than just that, of course. If you have an EFI machine, increasingly common, this might be of interest.
I got this working on my x220 tablet and thought I'd post it here. I imagine that as Archboot and the official installer rev we'll see them support this kind of thing as well, so BBS seemed like a good place to post it, but if there is an appropriate wiki location I could add it there as well.
This is pretty bare bones (otherwise you'd be using AIF or Archboot, natch) and should be customized for your own install purposes. Nonetheless, I suspect others may have been banging their heads on the low overhang of UEFI/GPT install and hope this helps them get up and running.
This is pretty much all in the wiki and BBS in various places, particularly the GRUB2 wiki entry. However the GPT partitioning (and learning more of sgdisk) were challenging enough that I felt it would be useful for others to see a working script.
I used the current-as-of-this-post Archboot iso (archlinux-2011.10-1-archboot.iso).
Don't just dd the archlinux iso to a usb. Format the USB stick as an MBR FAT drive and dump the entire Archboot ISO contents to it. To be honest, I did this in an Ubuntu vmware image I had on my mac, though I'd like to include command line options for doing this. TODO!
I also stuck the script (included herein) on the drive, but you could get it on the installation image at install time as well via scp or whatever you prefer.
On my x220 I then set the UEFI "BIOS" (the UEFI setup) to boot *ONLY* from UEFI. Pretty important. You should probably also stack your USB drive to top of your startup list or manually select it at boot time.
Boot from the USB stick. For my x220 I selected the second of the four efi grub options, x86_64.
Once Archboot is up, immediately leave the installer (option 8)
You may want to mount the usb drive to /src if you stuck this script on it. Archboot in UEFI mode doesn't seem to mount the usb drive properly (and the normal Archboot efi install will fail as well due to this). I think this is getting fixed in the next Archboot release, from what I've read on BBS.
# mount /dev/sdb1 /src
Run the script. For me this is
# /src/myarch.sh
(WARNING: will nuke everything on /dev/sda unless you've changed it).
There are probably things that could be done better/cleaner, feel free to point those out. This is really just a jumping off point.
UPDATE 15 NOV 2011: This now sources most packages locally to avoid kernel mismatch between install medium and install target.
UPDATE 16 NOV 2011: Script now unified the boot and efi partitions.
UPDATE 17 NOV 2011: Migrated code to github, including two versions (non-encrypted and LUKS-encrypted)
UPDATE 18 NOV 2011: Added encrypted swap
UPDATE 18 NOV 2011: Changed /boot/efi/grub to /boot/grub; removed extraneous /boot/efi directory entirely.
UPDATE 19 NOV 2011: Added a post-install script to handle user setup, etc. No reboot required.
UPDATE 20 NOV 2011: Post install section more complete, visudo automation added.
See code at: https://github.com/altercation/arch-by-hand
Last edited by altercation (2011-11-20 21:09:33)

I've come up with this script (although it's not quite right either):
#!/bin/bash
# prereqs:
# mount /dev/sdb1 /src
set -o nounset
#set -o errexit
INSTALL_TARGET="/mnt"
HR="--------------------------------------------------------------------------------"
# Initialize
# Warn
timer=9
echo -n "This procedure will completely format /dev/sda. Please cancel with ctrl-c to cancel within $timer seconds..."
while [[ $timer -gt 0 ]]
do
sleep 1
let timer-=1
echo -en "$timer seconds..."
done
echo "Starting"
# Configure_Host
echo -e "\nFormatting disk...\n$HR"
# disk prep
sgdisk -Z /dev/sda # zap all on disk
sgdisk -a 2048 -o /dev/sda # new gpt disk 2048 alignment
# create partitions
sgdisk -n 1:0:+250M /dev/sda # partition 1 (UEFI BOOT), default start block, 250MB
sgdisk -n 2:0:+2G /dev/sda # partition 2 (SWAP), default start block, 2G
sgdisk -n 3:0:+100M /dev/sda # partition3, (BOOT), boot partition
sgdisk -n 4:0:+10G /dev/sda # partition 4, (ARCH), default start, remaining space
sgdisk -n 5:0:0 /dev/sda # partition 5, (HOME)
# set partition types
sgdisk -t 1:ef00 /dev/sda
sgdisk -t 2:8200 /dev/sda
sgdisk -t 3:8300 /dev/sda
sgdisk -t 4:8300 /dev/sda
sgdisk -t 5:8300 /dev/sda
# label partitions
sgdisk -c 1:"UEFI BOOT" /dev/sda
sgdisk -c 2:"SWAP" /dev/sda
sgdisk -c 3:"BOOT" /dev/sda
sgdisk -c 4:"ARCH" /dev/sda
sgdisk -c 5:"HOME" /dev/sda
# make filesystems
echo -e "\nCreating Filesystems...\n$HR"
mkfs.vfat /dev/sda1
mkswap /dev/sda2
mkfs.ext2 /dev/sda3
mkfs.ext4 /dev/sda4
mkfs.ext4 /dev/sda5
# Run /arch/setup
echo -n "Don't select Grub as your bootloader and exit setup before the Install Bootloader step"
/arch/setup
# unmount filesytems
umount /dev/sda1
swapoff /dev/sda2
umount /dev/sda3
umount /dev/sda5
# Get Network
echo -n "Waiting for network address.."
#dhclient eth0
dhcpcd -p eth0
echo -n "Network address acquired."
# Update Pacman
echo -e "\nUpdating pacman...\n$HR"
sed -i "s/^#S/S/" /etc/pacman.d/mirrorlist
pacman --noconfirm -Sy
pacman --noconfirm --needed -S pacman
pacman --noconfirm -S gptfdisk btrfs-progs-unstable
# Prepare to chroot to target
mv ${INSTALL_TARGET}/etc/resolv.conf ${INSTALL_TARGET}/etc/resolv.conf.orig
cp /etc/resolv.conf ${INSTALL_TARGET}/etc/resolv.conf
sed -i "s/^#S/S/" ${INSTALL_TARGET}/etc/pacman.d/mirrorlist
mount -t proc proc ${INSTALL_TARGET}/proc
mount -t sysfs sys ${INSTALL_TARGET}/sys
mount -o bind /dev ${INSTALL_TARGET}/dev
echo -e "${HR}\nINSTALL BASE COMPLETE\n${HR}"
# Write Files
# install_efi (to be run *after* chroot /install)
touch ${INSTALL_TARGET}/install_efi
chmod a+x ${INSTALL_TARGET}/install_efi
cat > ${INSTALL_TARGET}/install_efi <<EFIEOF
mount /boot
mount /boot/efi
modprobe efivars
modprobe dm-mod
pacman --noconfirm -Sy
pacman --noconfirm --needed -S pacman
pacman --noconfirm -R grub
pacman --noconfirm -S grub2-efi-i386
grub_efi_i386-install --root-directory=/boot/efi --boot-directory=/boot/efi/efi --bootloader-id=grub --no-floppy --recheck
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "ARCH LINUX" --loader "\\EFI\\grub\\grub.efi"
grub-mkconfig -o /boot/efi/efi/grub/grub.cfg
exit
EFIEOF
# Install EFI
chroot /install /install_efi
rm /install/install_efi

Similar Messages

  • UEFI + GPT + SSD + HDD, partition layout for windows and archlinux

    Hi,
    I have got new computer based on UEFI. It has one ssd and one hdd. I would like to install windows 7 64bit and archlinux, both disks GPT partitioned.
    I would like to do it this way:
    SSD:
    /dev/sda1 - UEFI partition
    /dev/sda2 - windows system
    HDD:
    /dev/sdb1 - windows data
    /dev/sdb2 - /
    /dev/sdb3 - /home
    /dev/sdb4 - swap
    my question is: where should I put /boot partition? Should it be on SSD or HDD? Will placing /boot partition on SSD make bootup faster?

    I don't use a separate /boot partition. In my opinion, that's only needed if you boot multiple operating systems (ie. more than 2), because it can help with not having to worry about reinstalling the bootloader if you ever decide to reinstall one of them or replace it with something else. Some people cringe at the thought of not having a bootloader to get into a pretty GUI where they can click stuff. But it's really not that difficult to boot a "live" Linux distribution from a USB stick, chroot and reinstall the bootloader. I mean, you are using Arch. Using the command line should be a cinch.

  • Install Arch Linux with UEFI and GPT

    Hi, I purchased a new laptop and I created a partition with Windows 8 (default OS on laptop) and another partition where I want to install Arch Linux.
    When I tried to install Arch Linux not boot from CD. After searching in Google I downloaded the latest Arch Linux ISO (2012-12-01) and tried again.
    This time CD started without problems but when I used cfdisk showed an error with GPT partition. I went back to search in Google and I read about gdisk and gfdisk and I try it but when I partitioning to install Arch Linux partition show that may cause damage. I searched and searched without success and I wonder if there is a Arch Linux GPT install guide or if someone knows how to install Arch Linux with GPT and a Windows 8 partition in UEFI.
    Thanks and regards.

    Hi again, finally I got "install" Arch Linux but when I reboot the follow message appears:
    "No Booteable Device, Hit any key."
    I don't know if I broke Windows Boot Manager, UEFI or both...
    I tried to reinstall GRUB but was unsuccessful.
    Can anyone help me?
    Thanks and regards.

  • Converting my system to uefi/gpt boot running arch and win7

    Hello.  I've recently purchased a new hard drive, and now I need to reorganize my partition scheme.  I have a UEFI motherboard, so I'm going to go full uefi/gpt for booting and partitioning.  I've done my research this morning, and I believe I know what I need to do.  I just want to run it by the forum to see if there's something I am overlooking.
    I have one 250gb sata hdd and one 3TB sata hdd.  The 250 hdd with have one fat32 UEFI partition for booting and the rest will be an ext4 partition for Arch.  The 3TB hdd will have a 250gb NTFS partition for Win7, 250gb free space for experimentation, and the rest will be a large NTFS data partition.
    The 250gb hdd currently has an arch and a windows install on MBR partitions and is booting legacy style.  I intend to use dd to overwrite the first sector, so that no bootcode remains in the ProtectiveMBR that may confuse my firmware into trying to load.  I'll then partition/format the UEFI Fat32 partition and the Arch ext4 partition. 
    The 3tb hdd is already GPT and has never had an MBR written on it, so I'll simply need to re partition and format it. 250gb NTFS partition for Windows, 250gb free, 2.5tb NTFS data.   I'll install Windows first so that I don't have to setup GRUB twice.  And this is what concerns me.   When I install Windows, it's not going to have a UEFI partition available to it on the drive it's being installed to.   I'm concerned it might 'go rogue' and write bootcode to the ProtectiveMBR for one of those hybird BIOS-GPT boots.  Or will it see the UEFI partition on the other disc and write its thing there?  That would be fine, since I'll overwrite that when I install arch.
    Naturally after that I'll install Arch , setup grub on the uefi partition, and hopefully all is well.  Again my only concern is what if the windows install writes bootcode to the protectivembr and then I still end up booting strait to windows.  I suppose in that case I could just overwrite the first sector with 0's again.
    Anyway, I just wanted to see if I'm overlooking anything or if I'm just being paranoid.  I only just learned about UEFI, so my understanding of it is still a bit fuzzy.

    Which windows do you have?
    If windows installation starts first, you'll be able to correct its doing, to suite Arch booting mode. However in the ESP you may have any kind of boot loader / manager you'll like.
    Later Grub will guide to the windows boot loader and then your done.
    The only problem for certain version of windows is the kind of the partition. E.g. Vista doesn't accept logical partition. AFAIK.
    I have MBR and UEFI on my USB HD. I presume they can coexist, it's just a matter of bus, USB or SATA, internal or external doesn't matter.

  • From BIOS + MBR to UEFI + GPT

    Hello,
    I am trying to convert my classic installation from MBR to GPT and at the same time switch from BIOS to UEFI.
    If you must know, I am doing this to be able to try several OS without the 4 primary partitions limitations
    So I did some reading on the wiki (always full of many advices and useful information) and this seems possible but there are some steps I can't figure out.
    Here is my current MBR layout:
    $ LANG=C sudo fdisk -l /dev/sda
    Disk /dev/sda: 59.6 GiB, 64023257088 bytes, 125045424 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x74d7d416
    Device Boot Start End Blocks Id System
    /dev/sda1 * 63 1992059 995998+ 83 Linux
    /dev/sda2 1992060 5992244 2000092+ 82 Linux swap / Solaris
    /dev/sda3 5992245 125040639 59524197+ 83 Linux
    sda1 is the /boot partition with grub2, sda2 swap and sda3 is /.
    This would be done on a Dell Latitude E6410.
    I freed some space (around 3 MB) at the end of the disk as gdisk gave me a warning when I ran it. There is no warning anymore.
    I guess I will have to convert the disk from MBR to GPT using gdisk and "just" writing the new GPT layout (from gparted live CD)
    But then, what's next?
    Do I need a BIOS Boot Partition?
    (I'd say no as I plan to use UEFI + GPT but I'm not sure)
    Should I make some more room to fit a 512MB EFI System Partition somewhere? (if needed, I'm probably going to take the 512MB from the swap)
    (I'd say yes )
    Can I put this partition anywhere on the disk? (as long as I flag it as boot?)
    Thanks in advance!
    lilorox
    Last edited by lilorox (2014-06-10 21:50:58)

    lilorox wrote:
    OK, so basically, I just need to reformat my /boot in vfat and UEFI will be able to see the .efi inside that partition and will propose it as a mean to boot, right?
    But, I can't find any .efi files inside my current /boot partition.
    Your BIOS can only read FAT-formatted drives. Create the EFI System Partition in the live environment, mount it to /mnt/something, mount your / directory to /mnt/something_else, copy (-r) /mnt/something_else/boot to /mnt/something then change /etc/fstab as I have demonstrated
    You will need to boot in EFI-mode using the Arch live disk, then arch-chroot into your installation to put the bootloader in place; gummiboot or pure EFISTUB is the simplest & easiest to set up IMO. You need to be booted up in EFI-mode to successfully install the EFI bootloader --- check by using:
    efivar -l
    It will return a long list of variables if the system is booted in EFI-mode...

  • Is it possible to bitlocker-encypt a UEFI/GPT drive from which I boot with Windows 7 64-bit ultimate (TPM-motherboard)?

    Is it possible to bitlocker-encypt a UEFI/GPT drive from which I boot with Windows 7 64-bit ultimate (TPM-motherboard)?

    Sure. BL does support GPT.

  • INSTALL ARCHLINUX (new installation system by Arch Install Script)

    After many failed installations, I've resolved and written a mini-guide how to do an easy installation of Arch Linux. I've added it to Manualinux on point 44b.
    However, I report it below, maybe could be useful to someone:
    44b)INSTALL ARCHLINUX (new installation system by Arch Install Scripts)
    Choice if install ArchLinux 32 or 64 bit, following type these commands:
    -loadkeys it (choice your language)
    -Use cfdisk to create your partitions
    cfdisk /dev/sda  o /dev/sdx
    -Format Partitions Using mkfs and Create Swap
    mkfs.reiserfs /dev/sda1
         or
    mkfs.ext4 /dev/sda1
    mkswap /dev/sda2
    -Reboot system with installation cd
    reboot
    -Mount Partition:
    cd /
    mount /dev/sda1 /mnt
    -Make and mount swap partition:
    swapon /dev/sda2
    -Active wireless or ethernet connection
    wifi-menu (choice your wireless connection, I suggest your to disable temporarely your password on router-modem)
    dhcpcd (attach ethernet wire)
    -Install Base System:
    pacstrap /mnt base base-devel
    -Install Grub2:
    pacstrap /mnt grub-bios
    -Install Syslinux:
    pacstrap /mnt syslinux
    -Generate fstab:
    genfstab -p /mnt >> /mnt/etc/fstab
    -Login to arch-chroot:
    arch-chroot /mnt
    -Install package wifi-select
    ip link set wlan0 up
    pacman -S wifi-select
    -Configure Network:
    vi /etc/rc.conf
    add interface="eth0"
    add interface="wlan0"
    -Edit Hostname:
    vi /etc/hostname
    and add desired hostname
    -Set Timezone:
    ln -s /usr/share/zoneinfo/Europe/Rome /etc/localtime
    -Generate Locale:
    vi /etc/locale.gen
    enable:
    it_IT.UTF-8 UTF-8
    it_IT ISO-8859-1
    it_IT@euro ISO-8859-15
    -Execute locale-gen on shell:
    locale-gen
    -Configure Kernel:
    mkinitcpio -p linux
    -Configure Bootloader:
    grub-mkconfig -o /boot/grub/grub.cfg
    grub-install --recheck /dev/sda
    -Set root password:
    passwd root
    -Exit from arch-chroot:
    exit
    -Unmount Partition:
    umount /mnt
    -Reboot your system
    reboot
    -If ethernet wire is attached:
    dhcpcd
    -If you want configure wireless network:
    ip link set wlan0 up
    wifi-select (if you have not password on router-modem)
    pacman -Syu  kde wicd wicd-gtk (insert kdm wicd in /etc/rc.conf)
    reboot system and configure your router wireless/wifi connection
    Reinsert wireless password on your router/modem
    Last edited by Pantera (2012-09-17 20:14:31)

    You don't need to install both grub and syslinux. You configure grub in "Configure Bootloader" so this step is unnecessary:
    -Install Syslinux:
    pacstrap /mnt syslinux
    This next step doesn't configure the kernel, it creates an initramfs (see the Beginners' Guide):
    -Configure Kernel:
    mkinitcpio -p linux
    Last edited by 2ManyDogs (2012-09-17 20:28:58)

  • My SSD with a running Dreamweaver CS6 version crashed. Now a new SSD is installed and every time I try to reinstall DW CS6 the error " inconsistency in the installation programm database" (in german terms) occurs. I tried to delete everything concerning t

    My SSD with a running Dreamweaver CS6 version crashed. Now a new SSD is installed and every time I try to reinstall DW CS6 the error " inconsistency in the installation programm database" (in german terms) occurs. I tried to delete everything concerning to CS6, rebootet and so on - nothing worked. Two hours later I tried to install DW 5.5 - that worked. Afterwards I tried again to install 6.0 - without success. Can anybody help?

    Thank you for your answer. I could not find caps.db.
    Meanwhile I solved the problem as follows: I searched for "dreamweaver" everywhere an deleted everything I could find. Then I searched for "CS6" and did the same. I guess there were around 20 or more places where I deleted directorys or files. Suddenly the installation did not stop at 2 % what it always did before and the installation was a success :-) It cost me more than 4 hours to figure that out and I did not find a really helping hint somewhere. Adobe itself I could not contact because I could not find an email adress or a phone number - poor support for such an expensive software. For luck I did not have to deliver something just in time. Lacking a useful support is a really poor, poor attitude of Adobe... I think I will not buy anymore Adobe products - it could cost too much of my time... :-(

  • IMac/2010: can an SSD be installed after purchase, as an upgrade?

    iMac: can a SSD be installed along with HDD after purchase, as a later upgrade?

    Difficult question to answer,  the short answer is yes but there are ramifications! First is your warranty, this could negatively impact  your warranty so if you want an SSD then order the machine with one, it's that simple. Apple Stores will not perform the upgrade, some AASP's will but again you need to determine if the warranty is worth the risk. If you intend to do it remember iMacs are only designed to have the RAM upgraded by the end user, so again look at the warranty and decide if its worth it.
    My $.02, if you want an SSD order the machine with a SSD installed and you will have no worries. If you buy AppleCare this will extend the warranty to 3 years and you will have total piece of mind.

  • Is this a reasonable SSD to install in a new Macbook Pro?

    Hello all,
    I have never owned an apple laptop or desktop and I am about to purchase a brand new macbook pro 15". I am trying to decide between ordering the pre-installed 128 ssd provided by apple versus buying and installing my own. Most people seem to think that the performance boost from installing a third party SSD is well worth it.
    I'd appreciate any input on a good ssd to install in the macbook pro. From my limited research, http://www.newegg.com/Product/Product.aspx?Item=N82E16820227395&cmre=ocz_vertex_ssd-_-20-227-395--Product, would be a reasonable drive. This drive would cost me the same as the 128 SSD from apple.
    Being a new apple user, I am also curious about the difficulty of installing the mac OS and programs. Does apple send this software in CD format with new macbook pros ? If I did go with installing my own ssd where would I get the software I will need?
    Lastly, I just want to make sure that installing an SSD doesn't void applecare/warranty. I'm pretty sure that it doesn't, but there are alot of conflicting opinions on this for some reason.
    Thanks for your help!

    Maybe better:
    http://eshop.macsales.com/shop/internalstorage/Mercury_Extreme_SSDSandforce

  • Arch install Scripts

    Am I correct in assuming that if you download the Arch install scripts to your local machine (that's currently running arch), the process of installing arch onto another hard drive is exactly the same?
    Last edited by cyberpsych0sis (2014-11-19 05:01:30)

    circleface wrote:Try https://wiki.archlinux.org/index.php/In … ting_Linux and see if it answers your question.  The process is similar, but there are a few differences.
    That was the second place I checked all i found was:
    The goal of the bootstrapping procedure is to setup an environment from which arch-install-scripts (such as pacstrap and arch-root) run. This goal is achieved by installing arch-install-scripts natively on the host system, or setting up an Arch Linux-based chroot.
    If the host system runs Arch Linux, installing arch-install-scripts is straightforward.
    Which seems to say it is the same, but it comes across as pretty vague imo.

  • Hands-on with Windows 10: Installing the latest Technical Preview

     ---->
    Hands-on with Windows 10: Installing the latest Technical Preview (by Ed Bott, ZDNet)
    Carey Frisch

    Hi arnold jr,
    Windows 10 build 9926 runs well at my side. Both the upgrade and the clean install in Hyper-V.
    For the errors keeps occuring, if you are using any 3rd-party Virtual Machine, you may consider ask at their side.
    And if you are using Hyper-V, you may post the errors here, and we will help to take a look.
    Best regards
    Michael Shao
    TechNet Community Support

  • Hi need some help just purchased secound hand mac book pro, cant instal Mountain lion, can you help? Cheers

    Hi I need some help, I have purchased a secound hand MacBook Pro and cant install mountain lion, I have set up user name and password Ok, any sujestions cheers?

    Make sure it meets the requirements for Mountain Lion: http://support.apple.com/kb/HT5444

  • Should/can the install script included in source=() list?

    Hi,
    It is a good thing that the sources needed to build a package are md5summed for integrity, but in most packages the install script is not. I was thinking why this might be - the PKGBUILD can be expected to modify the script?
      So to try, in one of my packages I added the install script to the source=() list. The package builds of course just fine. Then, however, if I want to upload it to AUR, I try to make a source-only package with "makepkg --source", which brakes with something like this:
    ln: creating symbolic link `/tmp/foo/srclinks.YjYgQ8XlE/foo/foo.install': File exists
    This is because makepkg tries to create a 2 symbolic links with the same filename: one link for the "foo.install" in the source=() list and also for the install=() list....
    Is this deliberate, or a bug? Looks more like a bug to me, but thought I better ask first....
    Cheers,
    Greg

    shining wrote:
    imrehg wrote:
    It might be completely internal to the pacman but defines actions taken on the system - thus whatever is in .install has effects just like the rest of the files, maybe even more: the other files are just copied, the .install is executed.
    And while it might never get installed on the system, it's internals are - how else one could define a "post_uninstall()" if it wasn't stored? Being pacman developer you know much more about this than I do, can you give a bit of info on that?
    Right it is installed to pacman database, but again, it is pacman doing all that.
    Fair enough.... The detail, however, that is not installed does not preempt checksumming. Eg. patches are also: 1) used for the package, 2) not installed, and 3) still in the checksum....
    shining wrote:
    All I'm trying to get to, is there any serious reason (technical, not philosophical) NOT to checksum the install script as well?  Because I'm yet to see any valid arguments against it, and there are loads for it....
    Taking your example from kernel26 :
    -i $startdir/kernel26.install
    -i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
    Note that the scriptlet edited is the original one in $startdir , because that's the only place where it needs to be, from the packager pov.
    While for the preset file, it needs to be copied to $pkgdir and it is edited there.
    If you had a checksum for the scriptlet, it would also mean that makepkg -g output could be altered after running makepkg. Very weird..
    Ok, this is indeed the case. But if you look at real packages, it seems that after the package is compiled, many times they update the PKGBUILD with the new md5sum values. Again: core/kernel26.
    That .install update section in the PKGBUILD is then relegated to a "helper function" role that keep the information in sync when there's a new release, but as the PKGBUILD is distributed, it won't change anything in the .install anymore...
    Thus, again, there's no real difference between the .install files and other files used as source.
    shining wrote:Btw the whole scriptlet file could be created entirely from the pkgbuild build function.
    Sure, and that's a great thing! I actually wondered why so many packages have separate .install when it can be done in the PKGBUILD. Thought it might be some convention, but probably just habit.... I prefer doing it in the PKGBUILD as well, whenever possible...
    shining wrote:There might be ways to fix that, though I don't even see any good ones. But why bother ? You said there are loads of valid arguments to have it , but you didn't even give one !
    On the other hand, I'm yet to find any of your rebuttals that are not rebutted here again...
    shining wrote:What are you worried about here ? Security ? If you think adding a checksum for the install file is going to give you any security, you are badly fooling yourself. If someone is distributing a malicious pkgbuild, it can contain the md5sum of the malicious scriptlet which is shipped with it.
    I think you misunderstood me. I'm not complaining, but inquiring. The PKGBUILD system is awesome, and it makes me search out programs that I use but not in the repo/AUR so that I can make a new package. But also, I'm interested in the "how" and "why", and hope to improve things if possible. Now, to me it seems theres an unreasonable distinction to checksum some files needed for a package but not all of them. And thus I set out to ask the elders here on the Forum to see whether someone can shed light on the reasons of the current state. Not trying to piss of anybody, but being interested.
    Of course the md5sum is not security, it's a help, nothing more.
    As an example: some time ago, there was a package in the community (thus managed by TUs) that had an update. I wanted to check out something in the package, got the PKGBUILD and tried to make it myself - md5sum says that the sources are incorrect.... Obviously something must have gone very bad, because the md5sum field was updated according to the SVN, the package is available on pacman thus it had to build, and the sources used in the package have not been changed for a while so that cannot be a problem....
    I've got a package from a trusted source and it is broken, the md5sum told me. So the breakage can be the very same way in the install script, why is the md5sum not allowed to tell me that?
    shining wrote:The only security for pkgbuilds is yourself. When you get one from a strange place, you MUST read the pkgbuild/install files.
    Of course, never argued against it. But there are different layers of verbosity....
    Anyway....

  • Install media 2012.08.04 and latest install scripts - the shell

    I'm just curious about this: the latest install media uses zsh, the install scripts are bash scripts - the shell you're dropped in after "arch-chroot" is sh (SHELL=/bin/sh chroot "$@")
    Why do we use sh in the chrooted environment?

    Allan wrote:Because zsh is not installed by default...
    I understand, but let me rephrase : why the shell in the chrooted environment is sh and not bash? Isn't bash installed by default?
    In the previous version of the install scripts (present in the previous version of the install cd) the chrooted shell was bash, and in Arch "sh" is a symlink to bash (if I understand correctly, calling "bash" as "sh" make bash behave like sh).
    So, there's a reason to use sh in the chrooted installation?

Maybe you are looking for