You are not logged in.
Hello,
I'm going to install my new Crucial M4 SSD 64GB into my Laptop tomorrow and setup Arch Linux. I have been browsing all
threads and wiki articles concerning this topic but there are still some open questions.
http://forum.crucial.com/t5/Solid-State … td-p/64403
As it seems my SSD has 512KiB EBS and 4K Page Size. I don't want to risk having a non-aligned SSD so from what I have read
GPT is the way to go.
Since the normal Arch Installation Framework only uses fdisk (right?) I would have to partion my SSD with gdisk beforehand.
I have done a little testing on a virtual machine where I booted the Net Install Image and install gdisk with pacman -S gdisk
before starting /arch/setup. When I run it against /dev/sda I can use "n" to create my first partition. gdisk seems to use 2048
sectors at a time so my first partition would start at 2048. Is this a problem for the bootloader or BIOS maybe? I'm using a rather
old Laptop with BIOS no UEFI.
I would need a /boot /swap / and /home Partion I guess as I am using right now. The normal Arch Installation creates /boot as ext2
for whatever reason. Should I use a ext4 boot partition, because it can make use of TRIM with discard?
Is the order of partitions significant in any way? My HardDisk is [BOOT | SWAP | / | /home ]
Is it mandatory that Boot is the first partition on the disk and swap the second, then root and home?
When these questions are cleared I would create a 100Meg /boot as "8300", second partition 1G swap as "8200", third partition 8G / as "8300" and /home the rest also
as Linux Filesystem. Now I would use "w" to write the changes to disk and start /arch/setup afterwards.
My Bootloader of Choice is Syslinux which doesn't seem to need an extra partion for GPT.
I would now to the first steps as usual. When preparing the HardDrive I would choose option 3 to manually set montpoints.
I'd choose /dev/sda1 which is my 100Meg Partion and set it to Ext4 as /boot and set the discard opt?
/dev/sda2 Filesystem -> Swap
/dev/sda3 Filesystem Ext4 -> / Opt "discard"
/dev/sda4 Filesystem Ext4 -> /home Opt "discard"
DONE
This should commit all changes to the disk and I can continue selecting and installing packages.
From what I have read I would skip the bootloader installation which would fail anyway since there is no MBR on my drive.
Now the next step would be to install syslinux manually after I have exited the setup.
To do this I would do the following:
Bit 2 of the attributes for the /boot partition need to be set.
# sgdisk /dev/sda --attributes=1:set:2
This would toggle the attribute legacy BIOS bootable on partition 1
Verify:
# sgdisk /dev/sda --attributes=1:show
1:2:1 (legacy BIOS bootable)
Install the master boot record:
# dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/gptmbr.bin of=/dev/sda
where /dev/sda would be /dev/sda1 in my case?
No I'm almost done and should be able to boot with a syslinux prompt but no valid config file, right?
After that I would switch to systemd. Is there anything I should be aware of, when using systemd on a SSD
with GBT?
I would appreciate if someone with more experience could tell me if I'm wrong somewhere.
Kind Regards,
blackout23
PS: Why do people use gparted live CD to prepare the SSD? When I boot the Arch Linux ISO and run "dhcpd eth0" followed by "pacman -Syy" and "pacman -S gdisk" before doing anything else I have everything I need and the harddrive isn't mounted or beeing written on at this point right?
Last edited by blackout23 (2012-03-01 18:25:41)
Offline
The installer is just a live environment. I usually pull in gptfdisk in the live environment and prep the HD (I use GPT on several setups here, but none have an SSD). No separate /boot here, ext4 root, and GRUB2 on all systems.
So no need to prep your SSD before. You can do it all during the installation process; just make sure to keep the wiki handy especially when setting up the partition layout (so you have space to embed the bootloader).
Last edited by .:B:. (2012-02-29 20:27:17)
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
The installer is just a live environment. I usually pull in gptfdisk in the live environment and prep the HD (I use GPT on several setups here, but none have an SSD). No separate /boot here, ext4 root, and GRUB2 on all systems.
So no need to prep your SSD before. You can do it all during the installation process; just make sure to keep the wiki handy especially when setting up the partition layout (so you have space to embed the bootloader).
Do you mean I should simply use the auto-prepare in the Arch Installation Framework and everything should be aligned right?
What about seting /boot to ext4 on a SSD? Is this a clever idea or not necessary?
Offline
I have my system using GPT and systemd, but not SSD. I prepartitioned my disk using gdisk (available several places, including the Parted Magic CD), then installed Arch. I believe the instructions I was going by had me create /boot as ext2. I will check and update this post if that is incorrect.
I don't know exactly how systemd will interact with installation, as I converted to it several months after installing Arch. But it is working very well for me.
Tim
PS - I just checked and gdisk shows it as just, "BIOS boot partition".
Last edited by ratcheer (2012-02-29 20:59:30)
Offline
.:B:. wrote:The installer is just a live environment. I usually pull in gptfdisk in the live environment and prep the HD (I use GPT on several setups here, but none have an SSD). No separate /boot here, ext4 root, and GRUB2 on all systems.
So no need to prep your SSD before. You can do it all during the installation process; just make sure to keep the wiki handy especially when setting up the partition layout (so you have space to embed the bootloader).
Do you mean I should simply use the auto-prepare in the Arch Installation Framework and everything should be aligned right?
What about seting /boot to ext4 on a SSD? Is this a clever idea or not necessary?
Well, I suppose the Arch installation images use AIF, so you can just switch ttys, sync pacman, and install gptfdisk from there.
If you use GRUB2 there shouldn't be a problem with ext4, no clue about legacy GRUB, I don't know why you would split out /boot unless you have a use case for it.
Edit: ok, misread your last question, so no, it's not a clever idea, it just creates needless complexity.
Last edited by .:B:. (2012-02-29 21:00:28)
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
I have no experience with SSDs and I am not too sure about 4096K sectores either...
I have a SAMSUNG HN-M101MBB notebook disk and all the websites say it has 4096K sectors but parted --list only shows Sector size (logical/physical): 512B/512B
I also have a GPT partition scheme and used gdisk to set it up. In the gdisk "expert" menu there is this option available:
l Change the sector alignment value. Disks with more logical sectors per physical sectors (such as modern Advanced Format drives), some RAID configurations, and many SSD devices, can suffer performance problems if partitions are not aligned properly for their
internal data structures. On new disks, GPT fdisk attempts to align partitions on 2048-sector (1MiB) boundaries by default, which optimizes performance for all of these disk types. On pre-partitioned disks, GPT fdisk attempts to identify the alignment value used
on that disk, but will set 8-sector alignment on disks larger than 300 GB even if lesser alignment values are detected. In either case, it can be changed by using this option.
so changing it to 4096 or whatever you want to align it to should do the trick (but I don't know if this is necessary for your SSD).
Also, I use syslinux to boot my linux because unlike grub2 it doesn't need any extra partition (I don't have EFI) and can directly access /boot on ext4.
฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz
Offline
512 should be fine afaik, since 4K is a multiple of that.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
@blackout: I have no experience with systemd (shall I try it?) but I have some experience with SSD's and GPT
I have an ssd in me netbook (bios) and since last week one in my desktop (efi).
First of all: In my desktop I couldn't install a bootloader using the 2011.08 installer. I just couldn't... Instead I used archboot 2012.01 and things worked like a charm. I am using syslinux (and not grub/grub2). I wanted a uefi+ssd+gpt+btrfs setup. I also avoided the extra partition that way.
I don't have a /boot partition. I only seperate /home (either on its own disk or on its own partition).
edit: I just decided to refresh my netbook to usb btrfs and gpt (with bios). I installed from 2011.08 and everything went fine EXCEPT from syslinux.
Once I finished everything I rebooted the installation media and installed syslinux manually following this guide: https://wiki.archlinux.org/index.php/Sy … le_aka_GPT
All good!
You might run into the very same issue if you decide to go the syslinux way
Last edited by mandos (2012-03-01 01:23:54)
Offline
I managed to install Syslinux after partitioning with gdisk on a virtual machine and ended up
with a perfectly aligned hardisk (all start sectors can be divided by 8). So I will do that today with
the steps laid out in my first post.
My current HDD which was partitioned with the AIF isn't alingned which is no problem.
Gerät boot. Anfang Ende Blöcke Id System
/dev/sda1 * 63 208844 104391 83 Linux
/dev/sda2 208845 2313359 1052257+ 82 Linux Swap / Solaris
/dev/sda3 2313360 19727819 8707230 83 Linux
/dev/sda4 19727820 234436544 107354362+ 83 Linux
@mandos
You can give systemd a try it speeds up boot by starting everything at once. It is very easy to setup and toggle on and off without
risking your system.
I will also stay with ext2 as /boot partion. Since there shouldn't be excessive write activity on that partion I think I don't have to worry about SSD wear.
Offline
I just attempted to install archlinux on a GPT formatted 256gb M4 and I also could not install grub from the 2011.08 arch installer. I then made a newb move and decide to start fresh and have the installer "auto partion" and like I assumed start at 63. <-- Less then ideal.
My idea was to boot up gparted over the weekeng and attempt to move the partitions. Is that not a good idea?
Offline
Well I have installed my SSD and did everything as explained.
I installed Syslinux with dd and set /dev/sda to legacy bios bootable. Upon reboot
it says "Missing OS". Syslinux shoudl be in the first 440 bytes of my SSD but
somehow it can't find it. When I mount my drive in a live cd enviroment all files
are installed so it should work. Problem is that BIOS can't find syslinux at the moment.
Any hints? Is there a way to start my arch installation from a live cd enviroment manually selecting
the kernel image?
Offline
Since the normal Arch Installation Framework only uses fdisk (right?) I would have to partion my SSD with gdisk beforehand.
I have done a little testing on a virtual machine where I booted the Net Install Image and install gdisk with pacman -S gdisk
before starting /arch/setup. When I run it against /dev/sda I can use "n" to create my first partition. gdisk seems to use 2048
sectors at a time so my first partition would start at 2048. Is this a problem for the bootloader or BIOS maybe? I'm using a rather
old Laptop with BIOS no UEFI.
I am using BIOS+UEFI+GPT+GRUB2+SYSTEMD. grub2-bios and grub2-efi-x86_64 booting from gpt disk (1 BIOS boot and 1 UEFISYS partitions in the same disk), with systemd as the init system.
First of all systemd has absolutely nothing to do with the partitioning or the booting style you use, since all of them are dependent on the bootloader and the initramfs. By the time systemd starts, your kernel has already found its root filesystem and everything is good to go.
Secondly 2048 is the safest option since it will guarantee you don't need to re-partition your harddrive when you are 90 years old (when 1MiB block size are used and the machines hook you up into matrix or skynet or whatever). 2048*512B=1MiB
I would need a /boot /swap / and /home Partion I guess as I am using right now. The normal Arch Installation creates /boot as ext2
for whatever reason. Should I use a ext4 boot partition, because it can make use of TRIM with discard?Is the order of partitions significant in any way? My HardDisk is [BOOT | SWAP | / | /home ]
Is it mandatory that Boot is the first partition on the disk and swap the second, then root and home?
Separate /boot is not mandatory for both grub2 and syslinux. But I would recommend having the /boot partition alone with first 2 TiB of the HDD/SSD. This is because grub2 or syslinux store their files in /boot and those files are launched by the first stage bootloader code in the 440 byte MBR region and that can find the /boot partition only if it is within the 32-bit sector number addressable space. I also recommend keeping /boot as a simple partition and not within LUKS/LVM/RAID/etc .
Order of the partition is not important. You can even have swap in the 3rd HDD and /home in the 2nd SSD. Make sure the /boot and rootfs anre in the same disk though (for syslinux, grub2 is better at handling different disk scenarios).
You can definitely use ext4 with no issues.
For bios+gpt+syslinux, you need to have /boot within 2TiB with legacy bios bootable gpt attribute enabled for that partition. For bios+gpt+grub2, you need to have a separate NO FS 2MiB bios_grub (parted terminology) partition into which grub-setup embeds the core.img (second stage bootloader code).
PS: Why do people use gparted live CD to prepare the SSD? When I boot the Arch Linux ISO and run "dhcpd eth0" followed by "pacman -Syy" and "pacman -S gdisk" before doing anything else I have everything I need and the harddrive isn't mounted or beeing written on at this point right?
Because gparted lets you modify both partition and filesystems while parted (v3.0 and above) and fdisk/gdisk allow only partition manipulation.
I recommend using Archboot iso as it does most of these things automatically.
Offline
blackout23 wrote:Since the normal Arch Installation Framework only uses fdisk (right?) I would have to partion my SSD with gdisk beforehand.
I have done a little testing on a virtual machine where I booted the Net Install Image and install gdisk with pacman -S gdisk
before starting /arch/setup. When I run it against /dev/sda I can use "n" to create my first partition. gdisk seems to use 2048
sectors at a time so my first partition would start at 2048. Is this a problem for the bootloader or BIOS maybe? I'm using a rather
old Laptop with BIOS no UEFI.I am using BIOS+UEFI+GPT+GRUB2+SYSTEMD. grub2-bios and grub2-efi-x86_64 booting from gpt disk (1 BIOS boot and 1 UEFISYS partitions in the same disk), with systemd as the init system.
First of all systemd has absolutely nothing to do with the partitioning or the booting style you use, since all of them are dependent on the bootloader and the initramfs. By the time systemd starts, your kernel has already found its root filesystem and everything is good to go.
Secondly 2048 is the safest option since it will guarantee you don't need to re-partition your harddrive when you are 90 years old (when 1MiB block size are used and the machines hook you up into matrix or skynet or whatever). 2048*512B=1MiB
I would need a /boot /swap / and /home Partion I guess as I am using right now. The normal Arch Installation creates /boot as ext2
for whatever reason. Should I use a ext4 boot partition, because it can make use of TRIM with discard?Is the order of partitions significant in any way? My HardDisk is [BOOT | SWAP | / | /home ]
Is it mandatory that Boot is the first partition on the disk and swap the second, then root and home?Separate /boot is not mandatory for both grub2 and syslinux. But I would recommend having the /boot partition alone with first 2 TiB of the HDD/SSD. This is because grub2 or syslinux store their files in /boot and those files are launched by the first stage bootloader code in the 440 byte MBR region and that can find the /boot partition only if it is within the 32-bit sector number addressable space. I also recommend keeping /boot as a simple partition and not within LUKS/LVM/RAID/etc .
Order of the partition is not important. You can even have swap in the 3rd HDD and /home in the 2nd SSD. Make sure the /boot and rootfs anre in the same disk though (for syslinux, grub2 is better at handling different disk scenarios).
You can definitely use ext4 with no issues.
For bios+gpt+syslinux, you need to have /boot within 2TiB with legacy bios bootable gpt attribute enabled for that partition. For bios+gpt+grub2, you need to have a separate NO FS 2MiB bios_grub (parted terminology) partition into which grub-setup embeds the core.img (second stage bootloader code).
PS: Why do people use gparted live CD to prepare the SSD? When I boot the Arch Linux ISO and run "dhcpd eth0" followed by "pacman -Syy" and "pacman -S gdisk" before doing anything else I have everything I need and the harddrive isn't mounted or beeing written on at this point right?
Because gparted lets you modify both partition and filesystems while parted (v3.0 and above) and fdisk/gdisk allow only partition manipulation.
I recommend using Archboot iso as it does most of these things automatically.
Thanks your reply was the most helpful sofar!
Right now I'm trying to get my BIOS to start Syslinux but can't get it to work.
I did:
sgdisk /dev/sda --attributes=1:set:2
and
dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/gptmbr.bin of=/dev/sda
My SSD is the only harddrive which should be used as boot.
I'm having a GPT partition table right now with /dev/sda1 starting at 2048 beeing the boot partition.
Upon boot I get "Missing OS".
Last edited by blackout23 (2012-03-01 17:27:30)
Offline
Right now I'm trying to get my BIOS to start Syslinux but can't get it to work.
I did:
sgdisk /dev/sda --attributes=1:set:2
and
dd bs=440 conv=notrunc count=1 if=/usr/lib/syslinux/gptmbr.bin of=/dev/sdaMy SSD is the only harddrive which should be used as boot.
I'm having a GPT partition table right now with /dev/sda1 starting at 2048 beeing the boot partition.Upon boot I get "Missing OS".
Did you do
extlinux --install /boot/syslinux
and copy the files from /usr/lib/syslinux to /boot/syslinux? The menu config file should be /boot/syslinux/syslinux.cfg .
EDIT: Or maybe syslinux has issues with non-512 byte sector size. Can you try syslinux-git from aur or grub2-bios (compile with source files https://www.dropbox.com/s/jth3mchm3hobmfy or compiled pkgs at https://www.dropbox.com/s/jep9t8edsgx3yt6 - recommend manual compile though)?
Last edited by the.ridikulus.rat (2012-03-01 17:33:35)
Offline
I didn't do that, but when I do "mount /dev/sda1 /media/folder" and cd to "/media/folder" everything is in there with correct syslinux config files and kernel images.
Offline
I didn't do that, but when I do "mount /dev/sda1 /media/folder" and cd to "/media/folder" everything is in there with correct syslinux config files and kernel images.
You mean /media/folder/boot/syslinux/*.c32 and other files exist. Check whether /media/folder/boot/syslinux/ldlinux.sys file exists. If it exists then extlinux command should have been completed. Re-check whether 'legacy bios bootable' attribute has been set in /dev/sda1.
EDIT: I saw you said that you DIDN'T do it. I assume you mean the extlinux step. That step is important.
sudo extlinux --install /media/folder/boot/syslinux
.
To install syslinux you should do
1. Copy /usr/lib/syslinux/* to /boot/syslinux/* .
2. Extlinux step. Verify /boot/syslinux/ldlinux.sys is created.
3. Enable legacy bios bootable gpt attribute on the partition holding /boot/syslinux/* files.
4. Write gptmbr.bin to 440 byte MBR using dd.
5. Create /boot/syslinux/syslinux.cfg .
6. Reboot.
Last edited by the.ridikulus.rat (2012-03-01 17:39:40)
Offline
Since sda1 is /boot I have ldlinux.sys under /media/folder/syslinux/ldlinux.sys. It is there.
# sgdisk /dev/sda --attributes=1:show
1:2:1 (legacy BIOS bootable)
Last edited by blackout23 (2012-03-01 17:42:54)
Offline
Since sda1 is /boot I have ldlinux.sys under /media/folder/syslinux/ldlinux.sys. It is there.
Doesn't make sense. If sda1 is /boot, then ldlinux.sys should be at /boot/syslinux/ldlinux.sys , not /media/folder/syslinux/ldlinux.sys . Don't mount the same partition at two different mountpoints. It confuses the system and people alike.
Offline
Can you list the exact steps you followed for installing syslinux alone? After setting up partitions and the filesystems.
Offline
It is only mounted once. I'm in the Arch Live CD enviroment and mount to hard drive from there.
To install syslinux I simply selected it during the AIF. It was probably installed with "Install Packages" step.
I skiped the "Install Bootloader" Part (Step 7) and exited the Setup. After that I switched /dev/sda to bootable and
dd gptmbr.bin -> dev/sda.
Last edited by blackout23 (2012-03-01 17:48:40)
Offline
It is only mounted once. I'm in the Arch Live CD enviroment and mount to hard drive from there.
To install syslinux I simply selected it during the AIF. It was probably installed with "Install Packages" step.
I skiped the "Install Bootloader" Part (Step 7) and exited the Setup. After that I switched /dev/sda to bootable and
dd gptmbr.bin -> dev/sda.
Re-do https://bbs.archlinux.org/viewtopic.php … 3#p1065833 . AFAIK AIF supports syslinux. It doesn't support grub2 though.
Offline
I used ArchBoot now for installation and selected the GPT partitioning. For some strange reason it created one addition partion the size of my boot partition but now everything works. It installed EXTLINUX/SYSLINUX
with the more advanced installation framework.
Thanks for the help!
Offline
Your saying using the Archboot iso from https://wiki.archlinux.org/index.php/Archboot and selecting GPT aligned and alllowed a bootloader to install ie syslinux or grub2? If so I may just redo my whole setup instead of using Gparted to try and manually move the partitions.
Offline
Yes, I must say the Installation Framework of Archboot is alot better. You don't have to exit and fiddle with dd to hopefully get the bootloader going. It creates aligned partitions and when you are at Step 7 it simply installs the Bootloader with everything setup for GPT tabels.
Offline