Re: [gentoo-user] new installation - partitions

2014-09-06 Thread Håkon Alstadheim

On 05. sep. 2014 04:44, Daniel Frey wrote:
It is possible to boot in EFI mode off of a USB, as I used a Mint ISO 
to boot from in EFI mode. I would presume the USB needs to have the 
FAT partition that EFI requires. Dan 
Sounds good. Having /boot on a stick makes it easy to have whatever I 
might need available when my fancy-schmanzy root-fs fails to show up at 
boot :-) .
Always have a known good kernel and initramfs to fall back on, and tuck 
away some extra tools on the stick. Put some (statically linked) 
*parted,lvm,md and formatting binaries on there and you can easily 
rearrange things before mounting the root fs.






Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Alexander Kapshuk
On Thu, Sep 4, 2014 at 7:30 AM, Joseph syscon...@gmail.com wrote:
 I have a new SSD 480GB drive and I'm trying to partition it.  It was some
 time before I went through this so I found this information:
 http://wiki.gentoo.org/wiki/SSD

 But they omitted the Boot partition.
  Device   Start  End   Size Type
  /dev/sda1 2048 6143 2M BIOS boot partition
  /dev/sda2 6144  4200447 2G Linux swap
  /dev/sda3  4200448117231374  53.9G Linux filesystem

 There is Bios Boot 2MB but no Boot partition where kernel is located.

 The instruction from official Gentoo web-page is difference from display I'm
 getting on my screen when I use fdisk
 http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1chap=4

 I don't have an option of extended partition not can I make Boot partition
 /dev/sda2 (128MB) bootable by pressing a in fdisk.

 --
 Joseph


While not an SSD user, I too had to set up gentoo from scratch on a
laptop recently. I followed the disk partitioning instructions given
in the handbook, with the following partitions created:

Device BootStart   EndBlocks   Id  System
/dev/sda1 1 3  5198+  ef  EFI (FAT-12/16/32)
/dev/sda2   * 314105808+  83  Linux
/dev/sda31581506520   82  Linux swap
/dev/sda482  3876  28690200   83  Linux



Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Christian Kruse
Hi,

At Wed, 3 Sep 2014 22:30:32 -0600, Joseph wrote:
 But they omitted the Boot partition.
  Device   Start  End   Size Type
  /dev/sda1 2048 6143 2M BIOS boot partition
  /dev/sda2 6144  4200447 2G Linux swap
  /dev/sda3  4200448117231374  53.9G Linux filesystem

 There is Bios Boot 2MB but no Boot partition where kernel is located.

The 2M partition is the boot partition. But it is much to small, I've
been re-sizing it to 1G. That's more than enough for the initrd image,
grub and the kernel.

By the way, keep in mind that if you plan to use suspend to disk you
will need 2x RAM disk space on swap in the worst case.

Best regards,
--
Christian Kruse
http://ck.kennt-wayne.de/


pgpCumREjehHJ.pgp
Description: OpenPGP Digital Signature


Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Neil Bothwick
On Wed, 3 Sep 2014 22:30:32 -0600, Joseph wrote:

 I have a new SSD 480GB drive and I'm trying to partition it.  It was
 some time before I went through this so I found this information:
 http://wiki.gentoo.org/wiki/SSD
 
 But they omitted the Boot partition.
   Device   Start  End   Size Type
   /dev/sda1 2048 6143 2M BIOS boot partition
   /dev/sda2 6144  4200447 2G Linux swap
   /dev/sda3  4200448117231374  53.9G Linux filesystem
 
 There is Bios Boot 2MB but no Boot partition where kernel is located.

The BIOS boot partition is there to enable a non-EFI system to boot from
a GPT partitioned disk, it is not the same as /boot. If you want a
separate /boot, it is not a requirement, you need to create is as a
separate partition, like this

% sudo fdisk -l /dev/sda

Disk /dev/sda: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 04EFD165-FDDF-4C24-BA81-868B97BF9949

Device   Start  End   Size Type
/dev/sda1 2048 4095 1M BIOS boot partition
/dev/sda2 4096  2101247 1G Linux filesystem
/dev/sda3  2101248 3565567916G Linux swap
/dev/sda4 35655680   5860533134   2.7T Linux filesystem

Here sda1 is the BIOS boot and sda2 is /boot.

 The instruction from official Gentoo web-page is difference from
 display I'm getting on my screen when I use fdisk
 http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1chap=4

If you are using GPT partitons, and you should, gdisk is the tool to use
(emerge sys-apps/gptfdisk).

 I don't have an option of extended partition not can I make Boot
 partition /dev/sda2 (128MB) bootable by pressing a in fdisk.

GPT is not hindered by any of that legacy 4 partitions is enough for
anyone so lets kludge in some more crap, you just create partitions.


-- 
Neil Bothwick

*/ \* - Tribbles having a swordfight


signature.asc
Description: PGP signature


Re: [gentoo-user] new installation - partitions

2014-09-04 Thread J. Roeleveld
On Thursday, September 04, 2014 09:01:41 AM Christian Kruse wrote:
 Hi,
 
 At Wed, 3 Sep 2014 22:30:32 -0600, Joseph wrote:
  But they omitted the Boot partition.
  
   Device   Start  End   Size Type
   /dev/sda1 2048 6143 2M BIOS boot partition
   /dev/sda2 6144  4200447 2G Linux swap
   /dev/sda3  4200448117231374  53.9G Linux filesystem
  
  There is Bios Boot 2MB but no Boot partition where kernel is located.
 
 The 2M partition is the boot partition. But it is much to small, I've
 been re-sizing it to 1G. That's more than enough for the initrd image,
 grub and the kernel.
 
 By the way, keep in mind that if you plan to use suspend to disk you
 will need 2x RAM disk space on swap in the worst case.

No you don't.

I have 16GB RAM in my laptop and my swap partition is 17GB.

Just make sure you create a file like:
***
$ cat /etc/local.d/suspend_image_size.start 
#!/bin/sh
#
echo 0  /sys/power/image_size
***

And make this executable.

This fixes the problem I had that I couldn't suspend to disk when using 
more then half the memory.

With this, I never have an issue with hibernate.

--
Joost


Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Joseph

On 09/04/14 09:53, Alexander Kapshuk wrote:

On Thu, Sep 4, 2014 at 7:30 AM, Joseph syscon...@gmail.com wrote:

I have a new SSD 480GB drive and I'm trying to partition it.  It was some
time before I went through this so I found this information:
http://wiki.gentoo.org/wiki/SSD

But they omitted the Boot partition.
 Device   Start  End   Size Type
 /dev/sda1 2048 6143 2M BIOS boot partition
 /dev/sda2 6144  4200447 2G Linux swap
 /dev/sda3  4200448117231374  53.9G Linux filesystem

There is Bios Boot 2MB but no Boot partition where kernel is located.

The instruction from official Gentoo web-page is difference from display I'm
getting on my screen when I use fdisk
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1chap=4

I don't have an option of extended partition not can I make Boot partition
/dev/sda2 (128MB) bootable by pressing a in fdisk.

--
Joseph



While not an SSD user, I too had to set up gentoo from scratch on a
laptop recently. I followed the disk partitioning instructions given
in the handbook, with the following partitions created:

Device BootStart   EndBlocks   Id  System
/dev/sda1 1 3  5198+  ef  EFI (FAT-12/16/32)
/dev/sda2   * 314105808+  83  Linux
/dev/sda31581506520   82  Linux swap
/dev/sda482  3876  28690200   83  Linux


I think this is an example like in the handbook, the problem is the gpt partition printout will look slightly different, so I got confused at the beginning. 
What I have noticed is that these example don't show creating partition for home' I think home now is on root partition sda4.


--
Joseph



Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Joseph

On 09/04/14 08:25, Neil Bothwick wrote:

On Wed, 3 Sep 2014 22:30:32 -0600, Joseph wrote:


I have a new SSD 480GB drive and I'm trying to partition it.  It was
some time before I went through this so I found this information:
http://wiki.gentoo.org/wiki/SSD

But they omitted the Boot partition.
  Device   Start  End   Size Type
  /dev/sda1 2048 6143 2M BIOS boot partition
  /dev/sda2 6144  4200447 2G Linux swap
  /dev/sda3  4200448117231374  53.9G Linux filesystem

There is Bios Boot 2MB but no Boot partition where kernel is located.


The BIOS boot partition is there to enable a non-EFI system to boot from
a GPT partitioned disk, it is not the same as /boot. If you want a
separate /boot, it is not a requirement, you need to create is as a
separate partition, like this

% sudo fdisk -l /dev/sda

Disk /dev/sda: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 04EFD165-FDDF-4C24-BA81-868B97BF9949

Device   Start  End   Size Type
/dev/sda1 2048 4095 1M BIOS boot partition
/dev/sda2 4096  2101247 1G Linux filesystem
/dev/sda3  2101248 3565567916G Linux swap
/dev/sda4 35655680   5860533134   2.7T Linux filesystem

Here sda1 is the BIOS boot and sda2 is /boot.


The instruction from official Gentoo web-page is difference from
display I'm getting on my screen when I use fdisk
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1chap=4


If you are using GPT partitons, and you should, gdisk is the tool to use
(emerge sys-apps/gptfdisk).


I don't have an option of extended partition not can I make Boot
partition /dev/sda2 (128MB) bootable by pressing a in fdisk.


GPT is not hindered by any of that legacy 4 partitions is enough for
anyone so lets kludge in some more crap, you just create partitions.


Does GPT needs so much room for boot partition 1G? My current system boot partition is 30Mb Gentoo handbook recommend 128Mb 


So the boot partition (/dev/sda2) will be ext2. What type of will be /dev/sda1 
? ext2 as well.


--
Joseph



Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Neil Bothwick
On Thu, 4 Sep 2014 07:05:28 -0600, Joseph wrote:

 Disk /dev/sda: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 4096 bytes
 I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 Disklabel type: gpt
 Disk identifier: 04EFD165-FDDF-4C24-BA81-868B97BF9949
 
 Device   Start  End   Size Type
 /dev/sda1 2048 4095 1M BIOS boot partition
 /dev/sda2 4096  2101247 1G Linux filesystem
 /dev/sda3  2101248 3565567916G Linux swap
 /dev/sda4 35655680   5860533134   2.7T Linux filesystem
 
 Here sda1 is the BIOS boot and sda2 is /boot.
   
  The instruction from official Gentoo web-page is difference from
  display I'm getting on my screen when I use fdisk
  http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1chap=4  
 
 If you are using GPT partitons, and you should, gdisk is the tool to
 use (emerge sys-apps/gptfdisk).
   
  I don't have an option of extended partition not can I make Boot
  partition /dev/sda2 (128MB) bootable by pressing a in fdisk.  
 
 GPT is not hindered by any of that legacy 4 partitions is enough for
 anyone so lets kludge in some more crap, you just create partitions.  
 
 Does GPT needs so much room for boot partition 1G? My current system
 boot partition is 30Mb Gentoo handbook recommend 128Mb 

My BIOS boot partition is 1MB not 1GB. My /boot partition is 1GB to allow
room for a couple of System Rescue CD ISO images.
 
 So the boot partition (/dev/sda2) will be ext2. What type of will
 be /dev/sda1 ? ext2 as well.

No, it's type is BIOS boot partition, it's a completely different type
of partition and not used by your Linux installation at all, it's purely
there for the BIOS.


-- 
Neil Bothwick

I'm as confused as a baby in a topless bar.


signature.asc
Description: PGP signature


Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Joseph

On 09/04/14 14:29, Neil Bothwick wrote:

On Thu, 4 Sep 2014 07:05:28 -0600, Joseph wrote:


Disk /dev/sda: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 04EFD165-FDDF-4C24-BA81-868B97BF9949

Device   Start  End   Size Type
/dev/sda1 2048 4095 1M BIOS boot partition
/dev/sda2 4096  2101247 1G Linux filesystem
/dev/sda3  2101248 3565567916G Linux swap
/dev/sda4 35655680   5860533134   2.7T Linux filesystem

Here sda1 is the BIOS boot and sda2 is /boot.

 The instruction from official Gentoo web-page is difference from
 display I'm getting on my screen when I use fdisk
 http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1chap=4

If you are using GPT partitons, and you should, gdisk is the tool to
use (emerge sys-apps/gptfdisk).

 I don't have an option of extended partition not can I make Boot
 partition /dev/sda2 (128MB) bootable by pressing a in fdisk.

GPT is not hindered by any of that legacy 4 partitions is enough for
anyone so lets kludge in some more crap, you just create partitions.

Does GPT needs so much room for boot partition 1G? My current system
boot partition is 30Mb Gentoo handbook recommend 128Mb


My BIOS boot partition is 1MB not 1GB. My /boot partition is 1GB to allow
room for a couple of System Rescue CD ISO images.


So the boot partition (/dev/sda2) will be ext2. What type of will
be /dev/sda1 ? ext2 as well.


No, it's type is BIOS boot partition, it's a completely different type
of partition and not used by your Linux installation at all, it's purely
there for the BIOS.


Thank you for explanation.

Is your /home on root partition?  I've notice that handbook does not designate separate 
partition for home anymore.

--
Joseph



Re: [gentoo-user] new installation - partitions

2014-09-04 Thread J. Roeleveld
On 4 September 2014 15:54:17 CEST, Joseph syscon...@gmail.com wrote:
On 09/04/14 14:29, Neil Bothwick wrote:
On Thu, 4 Sep 2014 07:05:28 -0600, Joseph wrote:

 Disk /dev/sda: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
 Units: sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 4096 bytes
 I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 Disklabel type: gpt
 Disk identifier: 04EFD165-FDDF-4C24-BA81-868B97BF9949
 
 Device   Start  End   Size Type
 /dev/sda1 2048 4095 1M BIOS boot partition
 /dev/sda2 4096  2101247 1G Linux filesystem
 /dev/sda3  2101248 3565567916G Linux swap
 /dev/sda4 35655680   5860533134   2.7T Linux filesystem
 
 Here sda1 is the BIOS boot and sda2 is /boot.
 
  The instruction from official Gentoo web-page is difference from
  display I'm getting on my screen when I use fdisk
 
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1chap=4
 
 If you are using GPT partitons, and you should, gdisk is the tool
to
 use (emerge sys-apps/gptfdisk).
 
  I don't have an option of extended partition not can I make Boot
  partition /dev/sda2 (128MB) bootable by pressing a in fdisk.
 
 GPT is not hindered by any of that legacy 4 partitions is enough
for
 anyone so lets kludge in some more crap, you just create
partitions.

 Does GPT needs so much room for boot partition 1G? My current system
 boot partition is 30Mb Gentoo handbook recommend 128Mb

My BIOS boot partition is 1MB not 1GB. My /boot partition is 1GB to
allow
room for a couple of System Rescue CD ISO images.

 So the boot partition (/dev/sda2) will be ext2. What type of will
 be /dev/sda1 ? ext2 as well.

No, it's type is BIOS boot partition, it's a completely different
type
of partition and not used by your Linux installation at all, it's
purely
there for the BIOS.

Thank you for explanation.

Is your /home on root partition?  I've notice that handbook does not
designate separate partition for home anymore.

The handbook only provides an example which should work.

There is no reason to blindly follow it if you have other ideas on how to 
partition your disks.

--
Joost
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Rich Freeman
On Thu, Sep 4, 2014 at 9:29 AM, Neil Bothwick n...@digimed.co.uk wrote:
 My BIOS boot partition is 1MB not 1GB. My /boot partition is 1GB to allow
 room for a couple of System Rescue CD ISO images.


There are a few types of boot partitions these days.

One is used when booting GPT from legacy BIOS.  Grub needs to stick
some of its data in a known location and there isn't anyplace to store
that with GPT like there is with MBR.  So, GRUB makes you have a very
small partition (1-2MB I think offhand) to do it.

When booting from EFI you need a GPT boot partition (FAT - ugh) that
actually contains the image that gets booted, so it needs to have room
for at least a couple of kernels/initramfs - so that will be larger.

Then, when booting from an MBR disk with a legacy BIOS it isn't
uncommon to still have a boot partition big enough for a few
kernels/initramfs for a few reasons:
1.  If the BIOS is really old it might not be able to address your
entire disk, so you need it to be near the start of the disk.
2.  Your bootloader might not be able to read your root partition, so
you need something it can read so that your kernel/initramfs can do
the rest.

So, be careful when you read instructions on creating boot partitions
and make sure that they're trying to solve the problem that you
actually have...

--
Rich



Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Tom H
On Thu, Sep 4, 2014 at 10:00 AM, Rich Freeman ri...@gentoo.org wrote:

 When booting from EFI you need a GPT boot partition (FAT - ugh) that
 actually contains the image that gets booted, so it needs to have room
 for at least a couple of kernels/initramfs - so that will be larger.

If you're using gummiboot, you need to have a large EFI system
partition on which to store kernels.

But if you're using grub or refind, you only need to have a small FAT
partition for efi executables.

On my Ubuntu laptop:

# du -sh /boot/efi
3.4M /boot/efi



Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Neil Bothwick
On Thu, 4 Sep 2014 07:54:17 -0600, Joseph wrote:

 No, it's type is BIOS boot partition, it's a completely different
 type of partition and not used by your Linux installation at all, it's
 purely there for the BIOS.  
 
 Thank you for explanation.
 
 Is your /home on root partition?  I've notice that handbook does not
 designate separate partition for home anymore.

I use btrfs so the question doesn't really apply. But the handbook is
only a guide, you are free to use whichever partitioning scheme you
prefer.


-- 
Neil Bothwick

667 - The FAX number of the beast


signature.asc
Description: PGP signature


Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Håkon Alstadheim

On 04. sep. 2014 16:52, Tom H wrote:

On Thu, Sep 4, 2014 at 10:00 AM, Rich Freeman ri...@gentoo.org wrote:

When booting from EFI you need a GPT boot partition (FAT - ugh) that
actually contains the image that gets booted, so it needs to have room
for at least a couple of kernels/initramfs - so that will be larger.


I'm working on getting a new motherboard, Will I still be able to have 
my boot filesystem on a flash-stick? Currently I have everything except 
/boot on LVM on top of Physical Volumes on unpartitioned raid volumes. 
Having a single drive with an odd size makes swapping drives around when 
they fail and drop out of the raid a hassle, and I do not want to waste 
2G on every drive just to have a 2G boot partition. A flash stick (and 
another one for backup) is very pleasant to work with. Especially when i 
bork my initramfs or need to run maintenance without mounting my root 
filesystem. Will this work on an EFI board ?





Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Alan McKinnon
On 04/09/2014 22:05, Håkon Alstadheim wrote:
 On 04. sep. 2014 16:52, Tom H wrote:
 On Thu, Sep 4, 2014 at 10:00 AM, Rich Freeman ri...@gentoo.org wrote:
 When booting from EFI you need a GPT boot partition (FAT - ugh) that
 actually contains the image that gets booted, so it needs to have room
 for at least a couple of kernels/initramfs - so that will be larger.

 I'm working on getting a new motherboard, Will I still be able to have
 my boot filesystem on a flash-stick? Currently I have everything except
 /boot on LVM on top of Physical Volumes on unpartitioned raid volumes.
 Having a single drive with an odd size makes swapping drives around when
 they fail and drop out of the raid a hassle, and I do not want to waste
 2G on every drive just to have a 2G boot partition. A flash stick (and
 another one for backup) is very pleasant to work with. Especially when i
 bork my initramfs or need to run maintenance without mounting my root
 filesystem. Will this work on an EFI board ?



I don't see why it won't work. You only need /boot for two things:

- at boot time, the boot loader must be able to see it so it can load
the kernel
- when you update grub, you will overwrite files to /boot

As for as the BIOS/EFI is concerned, a stick is like an hdd - just
another drive, nothing special about it. If signing is involved, it's
the boot image that gets signed.

I say go for it and test it out. What have you go to lose? The thing
will either boot off a stick or it won't, this test won't damage anything


-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] new installation - partitions

2014-09-04 Thread Daniel Frey
On 09/04/2014 01:05 PM, Håkon Alstadheim wrote:
 On 04. sep. 2014 16:52, Tom H wrote:
 On Thu, Sep 4, 2014 at 10:00 AM, Rich Freeman ri...@gentoo.org wrote:
 When booting from EFI you need a GPT boot partition (FAT - ugh) that
 actually contains the image that gets booted, so it needs to have room
 for at least a couple of kernels/initramfs - so that will be larger.

 I'm working on getting a new motherboard, Will I still be able to have
 my boot filesystem on a flash-stick? Currently I have everything except
 /boot on LVM on top of Physical Volumes on unpartitioned raid volumes.
 Having a single drive with an odd size makes swapping drives around when
 they fail and drop out of the raid a hassle, and I do not want to waste
 2G on every drive just to have a 2G boot partition. A flash stick (and
 another one for backup) is very pleasant to work with. Especially when i
 bork my initramfs or need to run maintenance without mounting my root
 filesystem. Will this work on an EFI board ?
 
 

It should work with no issues. You may want to boot it in EFI mode as
some motherboards cripple functionality in 'legacy' mode. I just ran
into that with hdmi audio passthrough not working on an Intel NUC I
recently set up.

It is possible to boot in EFI mode off of a USB, as I used a Mint ISO to
boot from in EFI mode. I would presume the USB needs to have the FAT
partition that EFI requires.

Dan