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


[gentoo-user] Firefox segfaults when using WebRTC

2014-09-04 Thread Alexander Kapshuk
Has anyone on this list experienced this issue? Is there a fix for
that, that you know of?

A Google search returned these two links in particular:
https://support.mozilla.org/en-US/questions/977075
https://bugs.launchpad.net/ubuntu/+source/alsa-lib/+bug/1254562

equery -q l firefox
www-client/firefox-24.7.0
equery -q l '*alsa-lib*'
media-libs/alsa-lib-1.0.27.2

uname -impr
3.14.16-gentoo i686 Intel(R) Pentium(R) Dual CPU T3400 @ 2.16GHz GenuineIntel

Could this be the answer?
media-libs/webrtc-audio-processing

Thanks.



Re: [gentoo-user] oracle-jdk-bin 1.8.0.20 ebuild

2014-09-04 Thread Thanasis

on 09/03/2014 07:07 AM Saifi Khan wrote the following:

Hi:

portage has ebuild for oracle-jdk-bin-1.8.0.11 whereas oracle website
has update 20 ie. oracle-jdk-bin-1.8.0.20

i am interested in tweaking the ebuild in order to install 1.8.0.20



dev-java/oracle-jdk-bin-1.8.0.20 is in the tree.



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


[gentoo-user] Re: new installation - partitions

2014-09-04 Thread James
Joseph syscon780 at gmail.com writes:


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

Hello Joseph,

Often, the Arch linux documents give one a more robust background for
reading up  on issues/choices related to Gentoo. After all, Arch is based
on Gentoo and their documents are often a good compliment for reading
up on issues you face with Gentoo, particularly when abstracted to
a general understanding of the needs you may have.  That said, do not
blindly follow Arch Linux documents to resolve gentoo issues.

https://wiki.archlinux.org/index.php/partitioning

hth,
James





Re: [gentoo-user] Re: new installation - partitions

2014-09-04 Thread Jc García
2014-09-04 9:53 GMT-06:00 James wirel...@tampabay.rr.com:
 Joseph syscon780 at gmail.com writes:


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

 Hello Joseph,

 Often, the Arch linux documents give one a more robust background for
 reading up  on issues/choices related to Gentoo. After all, Arch is based
 on Gentoo and their documents are often a good compliment for reading
 up on issues you face with Gentoo,
Arch is NOT based on gentoo, ArchLinux is it's own thing, PKGBUILDS
for building, and pacman as package manager, and there's systemd which
is used there as default, on top of that, is the /bin and /sbin merge
in in /usr, so arch and gentoo are different and it's own thing each.

particularly when abstracted to
 a general understanding of the needs you may have.  That said, do not
 blindly follow Arch Linux documents to resolve gentoo issues.

But since Arch packages are very vanilla as those of Gentoo,  the Arch
documentation is a good source, but you have to be aware of the base
system differences.

 https://wiki.archlinux.org/index.php/partitioning

 hth,
 James






[gentoo-user] SSD discard / fstrim

2014-09-04 Thread Joseph

This is my first SSD drive 480GB (the only one in the box).  I read about all 
discard / trim option and just want to double check that I'm doing it correct.

I setup standard Gentoo and per instruction in Handbook.
Not I'm reading about discard 
http://wiki.gentoo.org/wiki/SSD


Do I setup: fstrim -v / 
or discard in fstab:

/dev/sda2   /boot   ext2noauto,noatime  1 2
/dev/sda4   /   ext4
defaults,relatime,discard   0 1
/dev/sda3   noneswapsw,pri=3,discard
0 0

Can I use them both?
Do I need to add discard to /boot?


--
Joseph



Re: [gentoo-user] SSD discard / fstrim

2014-09-04 Thread Rich Freeman
On Thu, Sep 4, 2014 at 2:26 PM, Сергей protsero...@gmail.com wrote:
 You need to run Fstrim if you mounted your partition WITHOUT discard
 option and did lots of changes. For example, if you installed your
 system without discard, do fstrim and then add discard to
 /etc/fstab.


Just a note that depending on the SSD model, discard can have a
substantial performance penalty with negligible benefit compared to
just sticking fstrim in your crontab.

In theory the ssd should just handle discard by making a note of what
is trimmed and utlizing this information when needed.  In practice
many ssds handle a trim by dropping whatever they're doing and don't a
copy/delete cycle if only part of a block is trimmed, which defeats
the whole point of trimming in the first place.  FStrim has the
advantage of being more asynchronous and possibly being able to
consolidate trims over a longer time-period, which could improve
performance if the ssd isn't smart about it.

Is there a really good place to go for SSD reviews/etc that actually
takes this sort of thing into account?  After getting an SSD it became
apparently that they vary widely in terms of quality.  Heck, I can't
even tell you what the erase cycle count is from the SMART info, while
other models seems to provide all kinds of useful info.

--
Rich



Re: [gentoo-user] SSD discard / fstrim

2014-09-04 Thread thegeezer
On 04/09/14 20:07, Rich Freeman wrote:
 On Thu, Sep 4, 2014 at 2:26 PM, Сергей protsero...@gmail.com wrote:
 You need to run Fstrim if you mounted your partition WITHOUT discard
 option and did lots of changes. For example, if you installed your
 system without discard, do fstrim and then add discard to
 /etc/fstab.

 Just a note that depending on the SSD model, discard can have a
 substantial performance penalty with negligible benefit compared to
 just sticking fstrim in your crontab.
+1
also for lvm remember to add in lvm.conf
issue_discards = 1


 In theory the ssd should just handle discard by making a note of what
 is trimmed and utlizing this information when needed.  In practice
 many ssds handle a trim by dropping whatever they're doing and don't a
 copy/delete cycle if only part of a block is trimmed, which defeats
 the whole point of trimming in the first place.  FStrim has the
 advantage of being more asynchronous and possibly being able to
 consolidate trims over a longer time-period, which could improve
 performance if the ssd isn't smart about it.
i understand that part of the reason it blocks so hard when run and
hasn't been run is the ssd defrags/consolidates the used blocks too. it
would be nice to know for sure what it's doing, or from kernel-space
tell the ssd what is most likely to be changing and what can be
consolidated happily.

 Is there a really good place to go for SSD reviews/etc that actually
 takes this sort of thing into account?  After getting an SSD it became
 apparently that they vary widely in terms of quality.  Heck, I can't
 even tell you what the erase cycle count is from the SMART info, while
 other models seems to provide all kinds of useful info.
+1 for this as other factors such as the erase blocksize should be taken
into account. i.e. the larger the erase blocksize the more need there is
for fstrim in the first place, but also the filesystem/partition
alignment becomes a magical dark art.

 --
 Rich





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




[gentoo-user] installed Gentoo on SSD - no bootable device

2014-09-04 Thread Joseph

I just installed gentoo on my new SSD (intel 480GB drive SSDSC2BF-480H501)

I mostly was installing everything over ssh (easier) and using grub2 but upon 
rebooting I get:

No bootable device - Insert boot disk and press any key

I boot strap to my system:

# swapon /dev/sda3
# mount -t ext4 /dev/sda4 /mnt/gentoo
# mount /dev/sda2 /mnt/gentoo/boot
# cd /mnt/gentoo
# mount -t proc none /mnt/gentoo/proc
# mount --rbind /dev /mnt/gentoo/dev 
# chroot /mnt/gentoo /bin/bash

# env-update
# source /etc/profile

If boot strap and try to start ssh I and get a warning (and can not login)

You attempting to run an openrc service on a system which openrc did not boot
...
I can ssh to the system before I boot I bootstrap

My partition:
fdisk -l /dev/sda

Disk /dev/sda: 447.1 GiB, 480103981056 bytes, 937703088 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: gpt
Disk identifier: 37C37937-6310-4B04-93A6-05CD7792EF16

Device   Start  End   Size Type
/dev/sda1 2048 6143 2M BIOS boot partition
/dev/sda2 6144   268287   128M Linux filesystem
/dev/sda3   268288  4462591 2G Linux swap
/dev/sda4  4462592937703054   445G Linux filesystem

sda2 - boot
sda4 - root

--
Joseph



Re: [gentoo-user] installed Gentoo on SSD - no bootable device

2014-09-04 Thread Joseph

On 09/04/14 18:17, Joseph wrote:

I just installed gentoo on my new SSD (intel 480GB drive SSDSC2BF-480H501)

I mostly was installing everything over ssh (easier) and using grub2 but upon 
rebooting I get:

No bootable device - Insert boot disk and press any key

I boot strap to my system:

# swapon /dev/sda3
# mount -t ext4 /dev/sda4 /mnt/gentoo
# mount /dev/sda2 /mnt/gentoo/boot
# cd /mnt/gentoo
# mount -t proc none /mnt/gentoo/proc
# mount --rbind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile

If boot strap and try to start ssh I and get a warning (and can not login)

You attempting to run an openrc service on a system which openrc did not boot
...
I can ssh to the system before I boot I bootstrap

My partition:
fdisk -l /dev/sda

Disk /dev/sda: 447.1 GiB, 480103981056 bytes, 937703088 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: gpt
Disk identifier: 37C37937-6310-4B04-93A6-05CD7792EF16

Device   Start  End   Size Type
/dev/sda1 2048 6143 2M BIOS boot partition
/dev/sda2 6144   268287   128M Linux filesystem
/dev/sda3   268288  4462591 2G Linux swap
/dev/sda4  4462592937703054   445G Linux filesystem

sda2 - boot
sda4 - root


When I installed grub2 I got no errors:
grub2-install /dev/sda
Installation finished. No error reported.

but looking at grub2 configuration, it is looking for kernel on sda4 (shouldn't 
it be sda2?).

linux   /vmlinuz-3.14.14-gentoo root=/dev/sda4 ro single


### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
 load_env
fi
if [ ${next_entry} ] ; then
  set default=${next_entry}
  set next_entry=
  save_env next_entry
  set boot_once=true
else
  set default=0
fi

if [ x${feature_menuentry_id} = xy ]; then
 menuentry_id_option=--id
else
 menuentry_id_option=
fi

export menuentry_id_option

if [ ${prev_saved_entry} ]; then
 set saved_entry=${prev_saved_entry}
 save_env saved_entry
 set prev_saved_entry=
 save_env prev_saved_entry
 set boot_once=true
fi

function savedefault {
 if [ -z ${boot_once} ]; then
   saved_entry=${chosen}
   save_env saved_entry
 fi
}

function load_video {
 if [ x$feature_all_video_module = xy ]; then
   insmod all_video
 else
   insmod efi_gop
   insmod efi_uga
   insmod ieee1275_fb
   insmod vbe
   insmod vga
   insmod video_bochs
   insmod video_cirrus
 fi
}

if [ x$feature_default_font_path = xy ] ; then
  font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
 search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 
--hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4  
00e8b950-21c6-4558-918f-855042b42d36
else
 search --no-floppy --fs-uuid --set=root 00e8b950-21c6-4558-918f-855042b42d36
fi
   font=/usr/share/grub/unicode.pf2
fi

if loadfont $font ; then
 set gfxmode=auto
 load_video
 insmod gfxterm
 set locale_dir=$prefix/locale
 set lang=en_US
 insmod gettext
fi
terminal_output gfxterm
if sleep --interruptible 0 ; then
 set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu 
--class os $menuentry_id_option 
'gnulinux-simple-00e8b950-21c6-4558-918f-855042b42d36' {
load_video
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 
--hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  
4fac7293-6a58-43a4-857b-6e3095a8e50d
else
  search --no-floppy --fs-uuid --set=root 
4fac7293-6a58-43a4-857b-6e3095a8e50d
fi
echo'Loading Linux 3.14.14-gentoo ...'
	linux	/vmlinuz-3.14.14-gentoo root=/dev/sda4 ro  
}

submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 
'gnulinux-advanced-00e8b950-21c6-4558-918f-855042b42d36' {
	menuentry 'Gentoo GNU/Linux, with Linux 3.14.14-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-3.14.14-gentoo-advanced-00e8b950-21c6-4558-918f-855042b42d36' {

load_video
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 
--hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  
4fac7293-6a58-43a4-857b-6e3095a8e50d
else
  search --no-floppy --fs-uuid --set=root 
4fac7293-6a58-43a4-857b-6e3095a8e50d
fi
echo'Loading Linux 3.14.14-gentoo ...'
		linux	/vmlinuz-3.14.14-gentoo root=/dev/sda4 ro  
	}
	menuentry 'Gentoo GNU/Linux, with Linux 3.14.14-gentoo (recovery mode)' --class gentoo --class 

Re: [gentoo-user] installed Gentoo on SSD - no bootable device

2014-09-04 Thread Daniel Frey
On 09/04/2014 05:36 PM, Joseph wrote:
 When I installed grub2 I got no errors:
 grub2-install /dev/sda
 Installation finished. No error reported.
 

If you are trying to boot in EFI mode, you aren't installing it
correctly. That installed to the MBR in legacy mode.


Instructions are here: http://wiki.gentoo.org/wiki/GRUB2

You need to mount /boot, and mount the EFI boot partition before
installing grub2 using `grub2-install --target=x86_64-efi`.

Dan



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



Re: [gentoo-user] installed Gentoo on SSD - no bootable device

2014-09-04 Thread Joseph

On 09/04/14 19:41, Daniel Frey wrote:

On 09/04/2014 05:36 PM, Joseph wrote:

When I installed grub2 I got no errors:
grub2-install /dev/sda
Installation finished. No error reported.



If you are trying to boot in EFI mode, you aren't installing it
correctly. That installed to the MBR in legacy mode.


Instructions are here: http://wiki.gentoo.org/wiki/GRUB2

You need to mount /boot, and mount the EFI boot partition before
installing grub2 using `grub2-install --target=x86_64-efi`.


I'm still lost with this grab2, very confusing.  Gentoo official documentation 
did not mention any of this :-/

Official documentation did ask to create /dev/sda1 2M BIOS boot partition but 
there was no instruction how to mount it or format it.
I was under impression Grub2 will do all of this.
I booted with CD-minimal and there is no mkdosfs command.

Do I need to format the /dev/sda1?

If I do:
mkfs -t vfat -F 32 -n efi-boot /dev/sda1
mkfs.vfat: No such file or directory

--
Joseph



Re: [gentoo-user] installed Gentoo on SSD - no bootable device

2014-09-04 Thread Daniel Frey
On 09/04/2014 08:14 PM, Joseph wrote:
 I'm still lost with this grab2, very confusing.  Gentoo official
 documentation did not mention any of this :-/
 
 Official documentation did ask to create /dev/sda1 2M BIOS boot
 partition but there was no instruction how to mount it or format it.
 I was under impression Grub2 will do all of this.
 I booted with CD-minimal and there is no mkdosfs command.
 
 Do I need to format the /dev/sda1?
 
 If I do:
 mkfs -t vfat -F 32 -n efi-boot /dev/sda1
 mkfs.vfat: No such file or directory
 

The easiest method would be to chroot into your installation. From
there, you can format the EFI partition, then mount it.

If you don't have mkfs.vfat in your chroot, I think the package that has
it is dosfstools.

So basically:

1. chroot into your install (makes sure /boot is mounted before
chroot'ing in)
2. format the EFI partition, install dosfstools if required
3. mount the EFI partition to /boot/efi
4. grub2-install --target=x86_64-efi

The grub.cfg you showed before looked correct to me, the Gentoo
GNU/Linux entry was trying to boot off of root='hd0,gpt2' which is correct.

Dan



Re: [gentoo-user] installed Gentoo on SSD - no bootable device

2014-09-04 Thread Daniel Frey
On 09/04/2014 08:14 PM, Joseph wrote:
 On 09/04/14 19:41, Daniel Frey wrote:
 On 09/04/2014 05:36 PM, Joseph wrote:
 When I installed grub2 I got no errors:
 grub2-install /dev/sda
 Installation finished. No error reported.


 If you are trying to boot in EFI mode, you aren't installing it
 correctly. That installed to the MBR in legacy mode.


 Instructions are here: http://wiki.gentoo.org/wiki/GRUB2

 You need to mount /boot, and mount the EFI boot partition before
 installing grub2 using `grub2-install --target=x86_64-efi`.
 
 I'm still lost with this grab2, very confusing.  Gentoo official
 documentation did not mention any of this :-/
 
 Official documentation did ask to create /dev/sda1 2M BIOS boot
 partition but there was no instruction how to mount it or format it.
 I was under impression Grub2 will do all of this.
 I booted with CD-minimal and there is no mkdosfs command.
 
 Do I need to format the /dev/sda1?
 
 If I do:
 mkfs -t vfat -F 32 -n efi-boot /dev/sda1
 mkfs.vfat: No such file or directory
 

I forgot to mention in my last post that you absolutely must boot from
an EFI-enabled kernel, the gentoo ISOs do not do this. I used the Mint
17 ISO to do this, when you go to boot options it should list it as EFI
bootable.

Dan



Re: [gentoo-user] installed Gentoo on SSD - no bootable device

2014-09-04 Thread Joseph

On 09/04/14 19:41, Daniel Frey wrote:

On 09/04/2014 05:36 PM, Joseph wrote:

When I installed grub2 I got no errors:
grub2-install /dev/sda
Installation finished. No error reported.



If you are trying to boot in EFI mode, you aren't installing it
correctly. That installed to the MBR in legacy mode.


Instructions are here: http://wiki.gentoo.org/wiki/GRUB2

You need to mount /boot, and mount the EFI boot partition before
installing grub2 using `grub2-install --target=x86_64-efi`.


How do I mount EFI boot partition?  
Is it the /dev/sda1 2M


--
Joseph



Re: [gentoo-user] installed Gentoo on SSD - no bootable device

2014-09-04 Thread Joseph

On 09/04/14 20:44, Daniel Frey wrote:

On 09/04/2014 08:14 PM, Joseph wrote:

On 09/04/14 19:41, Daniel Frey wrote:

On 09/04/2014 05:36 PM, Joseph wrote:

When I installed grub2 I got no errors:
grub2-install /dev/sda
Installation finished. No error reported.



If you are trying to boot in EFI mode, you aren't installing it
correctly. That installed to the MBR in legacy mode.


Instructions are here: http://wiki.gentoo.org/wiki/GRUB2

You need to mount /boot, and mount the EFI boot partition before
installing grub2 using `grub2-install --target=x86_64-efi`.


I'm still lost with this grab2, very confusing.  Gentoo official
documentation did not mention any of this :-/

Official documentation did ask to create /dev/sda1 2M BIOS boot
partition but there was no instruction how to mount it or format it.
I was under impression Grub2 will do all of this.
I booted with CD-minimal and there is no mkdosfs command.

Do I need to format the /dev/sda1?

If I do:
mkfs -t vfat -F 32 -n efi-boot /dev/sda1
mkfs.vfat: No such file or directory



I forgot to mention in my last post that you absolutely must boot from
an EFI-enabled kernel, the gentoo ISOs do not do this. I used the Mint
17 ISO to do this, when you go to boot options it should list it as EFI
bootable.


Thank you for explanation.
I have a question with regards to that EFI.  Does it refer to this /dev/sda1 2M 
BIOS boot partition?
So this partition needs to be formatted to DOS file system and mounted in /boot/efi directory? 


Gentoo Documentation is very outdated and confusing when it comes to this new 
GRUB2.
Sometimes I want to scrap this crap and go back to standard legacy GRUB.

--
Joseph



Re: [gentoo-user] installed Gentoo on SSD - no bootable device

2014-09-04 Thread Sid S
I believe what you've said is correct... because I'm pretty sure I read it
in the documentation.


On Thu, Sep 4, 2014 at 11:08 PM, Joseph syscon...@gmail.com wrote:

 On 09/04/14 20:44, Daniel Frey wrote:

 On 09/04/2014 08:14 PM, Joseph wrote:

 On 09/04/14 19:41, Daniel Frey wrote:

 On 09/04/2014 05:36 PM, Joseph wrote:

 When I installed grub2 I got no errors:
 grub2-install /dev/sda
 Installation finished. No error reported.


 If you are trying to boot in EFI mode, you aren't installing it
 correctly. That installed to the MBR in legacy mode.


 Instructions are here: http://wiki.gentoo.org/wiki/GRUB2

 You need to mount /boot, and mount the EFI boot partition before
 installing grub2 using `grub2-install --target=x86_64-efi`.


 I'm still lost with this grab2, very confusing.  Gentoo official
 documentation did not mention any of this :-/

 Official documentation did ask to create /dev/sda1 2M BIOS boot
 partition but there was no instruction how to mount it or format it.
 I was under impression Grub2 will do all of this.
 I booted with CD-minimal and there is no mkdosfs command.

 Do I need to format the /dev/sda1?

 If I do:
 mkfs -t vfat -F 32 -n efi-boot /dev/sda1
 mkfs.vfat: No such file or directory


 I forgot to mention in my last post that you absolutely must boot from
 an EFI-enabled kernel, the gentoo ISOs do not do this. I used the Mint
 17 ISO to do this, when you go to boot options it should list it as EFI
 bootable.


 Thank you for explanation.
 I have a question with regards to that EFI.  Does it refer to this
 /dev/sda1 2M BIOS boot partition?
 So this partition needs to be formatted to DOS file system and mounted in
 /boot/efi directory?
 Gentoo Documentation is very outdated and confusing when it comes to this
 new GRUB2.
 Sometimes I want to scrap this crap and go back to standard legacy GRUB.

 --
 Joseph