Re: [gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-16 Thread Matti Nykyri
On Mar 15, 2014, at 19:17, »Q« boxc...@gmx.net wrote:

 On Mon, 10 Mar 2014 13:33:20 +
 Mick michaelkintz...@gmail.com wrote:
 
 On Saturday 08 Mar 2014 20:22:12 »Q« wrote:
 On Sat, 08 Mar 2014 08:23:21 +0100
 
 grub booted Gentoo just fine, but Windows booting failed, something
 about not finding partitions or files.  Instead of troubleshooting
 that, I disabled os probing for grub (GRUB_DISABLE_OS_PROBER=true
 in /etc/default/grub) and added Windows via /etc/grub.d/40_custom ,
 like so:
 
 If you moved the MSWindows OS or boot partitions then the UUIDs would
 have changed.
 
 I moved the OS partition, and it's UUID did indeed change.
 

I have swaped the hard drive from my dual boot box and ran into the same 
problem trying get windows 7 to boot. As you also quite fast realice by reading 
different forums that changing windows boot parameters is a quite big hassle. I 
would not go that way! You have another simpler solution.

Change the hard disk device ID to the same value as the old disk. It is written 
on MBR. Change the UUID of the windows partition to the same as on the old 
partition. UUID on NTFS partition is written at the beginning of the partition 
at 0x48-4F. 

So by changing 2x16 bytes of data your machine should boot again correctly. 
Also if you grub is not on the same physical disk as windows then you need 
trick windows by changing the order with grub before booting (see map command)

 You'll need to edit the MSWindows boot menu (in the MSWindows boot
 partition) and change their entrie(s) accordingly.
 
 If somebody can post a link to a recipe for doing that, I'd appreciate
 it.  I don't understand the Windows boot stuff.
 
 




Re: [gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-16 Thread Mick
On Sunday 16 Mar 2014 09:07:49 Matti Nykyri wrote:
 Change the hard disk device ID to the same value as the old disk. It is
 written on MBR. Change the UUID of the windows partition to the same as on
 the old partition. UUID on NTFS partition is written at the beginning of
 the partition at 0x48-4F. 

Can you give more detail please?  How would you change disk and partition 
UUIDs? 

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: [OT] LENOVO Z510 + Dual Boot + Gentoo == True ?

2014-03-16 Thread Matti Nykyri
On Mar 16, 2014, at 12:38, Mick michaelkintz...@gmail.com wrote:

 On Sunday 16 Mar 2014 09:07:49 Matti Nykyri wrote:
 Change the hard disk device ID to the same value as the old disk. It is
 written on MBR. Change the UUID of the windows partition to the same as on
 the old partition. UUID on NTFS partition is written at the beginning of
 the partition at 0x48-4F. 
 
 Can you give more detail please?  How would you change disk and partition 
 UUIDs? 
 
 -- 
 Regards,
 Mick

Well when you purchase a new blank disk it is full with null's. When you first 
time open that drive with for example with fdisk it complains about incorrect 
mbr. If you in that situation print the partition table you will see that the 
device id is null.

When you create a partition these errors will be corrected by write. Fdisk 
creates a new device id from random data. It is then written to the mbr. Just 
explore the disk with hexedit and you'll find the device id. Just remember 
endianess.

By the same way a UUID is created when you format a new NTFS partition. It is 
also just random data written to the disk. It can easily edited with hexedit. 
At least my win7 booted normally when i moved it from a disk to another and 
fixed the UUID's of the new drive. Windows didn't notice anything. After i 
switched the motherboard of the machine then windows required a new activation.

Actually if you copy the windows partition with dd the uuid of the NTFS 
partition will not change. If you also copy the beginning of the old disk to a 
new one it will copy the device id to the new disk. Instead if you make a new 
partition table the device id will change.

There is nothing magical with partitioning and moving data on disk or to 
another disk. You can completely wipe mbr and partition table and then write a 
new partition table with partitions pointing to the beginning of your data and 
all your data will be intact.

Just experiment with hexedit. I can give you correct addresses when i'm back at 
home tomorrow. Or just google your self, if you are unable to find it with 
hexedit.

-- 
Matti


[gentoo-user] dracut: mount: special device /dev/disk/by-label/usr does not exist

2014-03-16 Thread Dale
Howdy,

I got this when rebooting after we had a power outage.  I have a UPS so
I was able to perform a regular shutdown.


[2.567061] hub 8-1:1.0: state 7 ports 4 chg  evt 
[2.567069] hub 8-1:1.0: hub_suspend
[2.579644] usb 8-1: usb auto-suspend, wakeup 1
[2.591677] hub 8-0:1.0: hub_suspend
[2.591682] usb usb8: bus auto-suspend, wakeup 1
[3.362374] dracut: root has been mounted 29 times without being
checked, check forced.
[3.363014] dracut: root: 28323/1525920 files (0.4% non-contiguous),
580665/6102684 blocks
[3.364957] dracut: Mounting
/dev/disk/by-uuid/888352dd-9c91-4a9f-9595-cd0e74b74ee7 with -o defaults,ro
[3.474224] EXT4-fs (sda6): mounted filesystem with ordered data
mode. Opts: (null)
[3.522894] dracut: Mounted root filesystem /dev/sda6
[3.568630] dracut: Mounting /usr with -o defaults,ro
[3.600028] dracut: mount: special device /dev/disk/by-label/usr does
not exist
[3.601749] dracut Warning: Mounting /usr to /sysroot/usr failed
[3.602452] dracut Warning: *** Dropping you to a shell; the system
will continue
[3.603419] dracut Warning: *** when you leave the shell.
[3.604892] dracut Warning:
[3.849621] blkid (2070) used greatest stack depth: 4576 bytes left
+ '[' -f /run/initramfs/init.log ']'
root@fireball / #


It seems to me that the / file system needed to be checked.  For that
reason, it couldn't mount /usr after the check was performed.  That's my
thinking on this.  Anyone think otherwise?  Is this a one off event or
should I be concerned about this?

Is there some way to avoid this in the future without disabling file
system check for /? 

Another related LVM question.  I have some partitions on LVM.  If I
moved the drives to another system, would the new LVMs be found on the
new system or is there some magic involved to find and get them
mounted?  Example.  My /home is on its own LVM partition.  If I moved
the drive that has that on it, would the new system see it or would I
have to do something to make it see it?  I suspect and wouldn't want it
to mount automatically.  I'd just want to be able to see it and mount it
if needed.  Sort of a question I have always wondered about. 

Thanks much.

Dale

:-)  :-) 

P. S.  For those who recall my brother having cancer.  He is close to
the end of his treatments.  Lost a LOT of weight but hanging in there. 



Re: [gentoo-user] dracut: mount: special device /dev/disk/by-label/usr does not exist

2014-03-16 Thread Jc García
2014-03-16 8:24 GMT-06:00 Dale rdalek1...@gmail.com:

 Howdy,

 I got this when rebooting after we had a power outage.  I have a UPS so
 I was able to perform a regular shutdown.


 [2.567061] hub 8-1:1.0: state 7 ports 4 chg  evt 
 [2.567069] hub 8-1:1.0: hub_suspend
 [2.579644] usb 8-1: usb auto-suspend, wakeup 1
 [2.591677] hub 8-0:1.0: hub_suspend
 [2.591682] usb usb8: bus auto-suspend, wakeup 1
 [3.362374] dracut: root has been mounted 29 times without being
 checked, check forced.
 [3.363014] dracut: root: 28323/1525920 files (0.4% non-contiguous),
 580665/6102684 blocks
 [3.364957] dracut: Mounting
 /dev/disk/by-uuid/888352dd-9c91-4a9f-9595-cd0e74b74ee7 with -o defaults,ro
 [3.474224] EXT4-fs (sda6): mounted filesystem with ordered data
 mode. Opts: (null)
 [3.522894] dracut: Mounted root filesystem /dev/sda6
 [3.568630] dracut: Mounting /usr with -o defaults,ro
 [3.600028] dracut: mount: special device /dev/disk/by-label/usr does
 not exist


Seems like the block device for /usr couldn't be found by it's label, root
partition seems fine after check and properly mounted, so I'd say it has
nothing to do.


 [3.601749] dracut Warning: Mounting /usr to /sysroot/usr failed
 [3.602452] dracut Warning: *** Dropping you to a shell; the system
 will continue
 [3.603419] dracut Warning: *** when you leave the shell.
 [3.604892] dracut Warning:
 [3.849621] blkid (2070) used greatest stack depth: 4576 bytes left
 + '[' -f /run/initramfs/init.log ']'
 root@fireball / #


 It seems to me that the / file system needed to be checked.  For that
 reason, it couldn't mount /usr after the check was performed.  That's my
 thinking on this.  Anyone think otherwise?  Is this a one off event or
 should I be concerned about this?


Is the block device corresponding to /usr available under another directory
in /dev?  if not something wrong might be going on with that block device.
I personally prefer using UUIDs for finding partitions at boot, they are
more fail-proof.

Is there some way to avoid this in the future without disabling file
 system check for /?


Again, maybe UUIDs.


 Another related LVM question.  I have some partitions on LVM.  If I
 moved the drives to another system, would the new LVMs be found on the
 new system or is there some magic involved to find and get them
 mounted?  Example.  My /home is on its own LVM partition.  If I moved
 the drive that has that on it, would the new system see it or would I
 have to do something to make it see it?  I suspect and wouldn't want it
 to mount automatically.  I'd just want to be able to see it and mount it
 if needed.  Sort of a question I have always wondered about.



On my experience as long, as udev and lvm are running on the receiving
system, they should be found and placed for access under /dev, not mounted
automatically.
if for some reason it doesnt happen, its easy to do a 'pvscan' to see if
the physical volume is recognized, and if it is, 'vgchange -ay
volume_group_name ' activates all LVs.


 Thanks much.

 Dale

 :-)  :-)

 P. S.  For those who recall my brother having cancer.  He is close to
 the end of his treatments.  Lost a LOT of weight but hanging in there.




Re: [gentoo-user] dracut: mount: special device /dev/disk/by-label/usr does not exist

2014-03-16 Thread Dale
Jc García wrote:

 2014-03-16 8:24 GMT-06:00 Dale rdalek1...@gmail.com
 mailto:rdalek1...@gmail.com:

 Howdy,

 I got this when rebooting after we had a power outage.  I have a
 UPS so
 I was able to perform a regular shutdown.


 [2.567061] hub 8-1:1.0: state 7 ports 4 chg  evt 
 [2.567069] hub 8-1:1.0: hub_suspend
 [2.579644] usb 8-1: usb auto-suspend, wakeup 1
 [2.591677] hub 8-0:1.0: hub_suspend
 [2.591682] usb usb8: bus auto-suspend, wakeup 1
 [3.362374] dracut: root has been mounted 29 times without being
 checked, check forced.
 [3.363014] dracut: root: 28323/1525920 files (0.4%
 non-contiguous),
 580665/6102684 blocks
 [3.364957] dracut: Mounting
 /dev/disk/by-uuid/888352dd-9c91-4a9f-9595-cd0e74b74ee7 with -o
 defaults,ro
 [3.474224] EXT4-fs (sda6): mounted filesystem with ordered data
 mode. Opts: (null)
 [3.522894] dracut: Mounted root filesystem /dev/sda6
 [3.568630] dracut: Mounting /usr with -o defaults,ro
 [3.600028] dracut: mount: special device
 /dev/disk/by-label/usr does
 not exist


 Seems like the block device for /usr couldn't be found by it's label,
 root partition seems fine after check and properly mounted, so I'd say
 it has nothing to do.
  

 [3.601749] dracut Warning: Mounting /usr to /sysroot/usr failed
 [3.602452] dracut Warning: *** Dropping you to a shell; the system
 will continue
 [3.603419] dracut Warning: *** when you leave the shell.
 [3.604892] dracut Warning:
 [3.849621] blkid (2070) used greatest stack depth: 4576 bytes left
 + '[' -f /run/initramfs/init.log ']'
 root@fireball / #


 It seems to me that the / file system needed to be checked.  For that
 reason, it couldn't mount /usr after the check was performed.
  That's my
 thinking on this.  Anyone think otherwise?  Is this a one off event or
 should I be concerned about this?


 Is the block device corresponding to /usr available under another
 directory in /dev?  if not something wrong might be going on with that
 block device.
 I personally prefer using UUIDs for finding partitions at boot, they
 are more fail-proof.

Well, after that, it booted fine.  I forgot to mention that it did boot
without me doing anything but letting it proceed.  I *think* I typed
exit or something to get it to keep going. 



 Is there some way to avoid this in the future without disabling file
 system check for /?


 Again, maybe UUIDs.

I tried that once and grub didn't like it.  May need to see if things
have improved in that area since. 



 Another related LVM question.  I have some partitions on LVM.  If I
 moved the drives to another system, would the new LVMs be found on the
 new system or is there some magic involved to find and get them
 mounted?  Example.  My /home is on its own LVM partition.  If I moved
 the drive that has that on it, would the new system see it or would I
 have to do something to make it see it?  I suspect and wouldn't
 want it
 to mount automatically.  I'd just want to be able to see it and
 mount it
 if needed.  Sort of a question I have always wondered about.
  


 On my experience as long, as udev and lvm are running on the receiving
 system, they should be found and placed for access under /dev, not
 mounted automatically.
 if for some reason it doesnt happen, its easy to do a 'pvscan' to see
 if the physical volume is recognized, and if it is, 'vgchange -ay
 volume_group_name ' activates all LVs.
  

 Thanks much.

 Dale

 :-)  :-)


That's my thinking to but I have never had the chance to test it.  I
figured the info is stored on the drive and moves wherever the drives
goes as long as LVM is running. 

Thanks much. 

Dale

:-)  :-) 

-- 
I am only responsible for what I said ... Not for what you understood or how 
you interpreted my words!



Re: [gentoo-user] dracut: mount: special device /dev/disk/by-label/usr does not exist

2014-03-16 Thread Jc García
2014-03-16 9:40 GMT-06:00 Dale rdalek1...@gmail.com:

  Jc García wrote:


  Is there some way to avoid this in the future without disabling file
 system check for /?


  Again, maybe UUIDs.


 I tried that once and grub didn't like it.  May need to see if things have
 improved in that area since.



For grub2 works fine for me, but the issue here was after grub had done its
job, is the way dracut or more accurately the initrd, was trying to mount
partitions before calling init.
Not sure at all, but the fstab inside the initrd would have had something
to do, so maybe, setting UUIDs in fstab and reconstructing the initrd,
might prevent the issue from happening again.


 Another related LVM question.  I have some partitions on LVM.  If I
 moved the drives to another system, would the new LVMs be found on the
 new system or is there some magic involved to find and get them
 mounted?  Example.  My /home is on its own LVM partition.  If I moved
 the drive that has that on it, would the new system see it or would I
 have to do something to make it see it?  I suspect and wouldn't want it
 to mount automatically.  I'd just want to be able to see it and mount it
 if needed.  Sort of a question I have always wondered about.



  On my experience as long, as udev and lvm are running on the receiving
 system, they should be found and placed for access under /dev, not mounted
 automatically.
  if for some reason it doesnt happen, its easy to do a 'pvscan' to see if
 the physical volume is recognized, and if it is, 'vgchange -ay
 volume_group_name ' activates all LVs.


 Thanks much.

 Dale

 :-)  :-)


 That's my thinking to but I have never had the chance to test it.  I
 figured the info is stored on the drive and moves wherever the drives goes
 as long as LVM is running.


I think it's metadata stored in the PV.



 Thanks much.

 Dale

 :-)  :-)

 --
 I am only responsible for what I said ... Not for what you understood or how 
 you interpreted my words!




Re: [gentoo-user] dracut: mount: special device /dev/disk/by-label/usr does not exist

2014-03-16 Thread Neil Bothwick
On Sun, 16 Mar 2014 09:05:01 -0600, Jc García wrote:

  Another related LVM question.  I have some partitions on LVM.  If I
  moved the drives to another system, would the new LVMs be found on the
  new system or is there some magic involved to find and get them
  mounted?  Example.  My /home is on its own LVM partition.  If I moved
  the drive that has that on it, would the new system see it or would I
  have to do something to make it see it?  I suspect and wouldn't want
  it to mount automatically.  I'd just want to be able to see it and
  mount it if needed.  Sort of a question I have always wondered about.

 On my experience as long, as udev and lvm are running on the receiving
 system, they should be found and placed for access under /dev, not
 mounted automatically.

Unless there is already a VG on the other system with the same name. LVM
doesn't handle VG name clashes, yet some distros still give them generic
names.


-- 
Neil Bothwick

... I just forgot to increment the counter, Tom said, nonplussed.


signature.asc
Description: PGP signature


[gentoo-user] Where is /etc/conf.d/net.example?

2014-03-16 Thread Chris Stankevitz
Where is the proper place to specify the gentoo network configuration nowadays?

I do not have a file called /etc/conf.d/net.example on my hard drive.
That surprised me.

The handbook talks all about eth0, but my machine does not have a
eth0.  It has eno1.  Perhaps the handbook is not up to date?

I'm using wicd now but I want to ditch wicd and replace it with the
generally accepted correct gentoo way.

Thank you,

Chris



Re: [gentoo-user] Where is /etc/conf.d/net.example?

2014-03-16 Thread Alon Bar-Lev
/usr/share/doc/netifrc-0.1/net.example.bz2


On Sun, Mar 16, 2014 at 8:27 PM, Chris Stankevitz chrisstankev...@gmail.com
 wrote:

 Where is the proper place to specify the gentoo network configuration
 nowadays?

 I do not have a file called /etc/conf.d/net.example on my hard drive.
 That surprised me.

 The handbook talks all about eth0, but my machine does not have a
 eth0.  It has eno1.  Perhaps the handbook is not up to date?

 I'm using wicd now but I want to ditch wicd and replace it with the
 generally accepted correct gentoo way.

 Thank you,

 Chris




Re: [gentoo-user] Where is /etc/conf.d/net.example?

2014-03-16 Thread Alexander Kapshuk
On 03/16/2014 08:27 PM, Chris Stankevitz wrote:
 Where is the proper place to specify the gentoo network configuration 
 nowadays?

 I do not have a file called /etc/conf.d/net.example on my hard drive.
 That surprised me.

 The handbook talks all about eth0, but my machine does not have a
 eth0.  It has eno1.  Perhaps the handbook is not up to date?

 I'm using wicd now but I want to ditch wicd and replace it with the
 generally accepted correct gentoo way.

 Thank you,

 Chris

As far as eth0 goes, the handbook does talk about network interface
names other than eth0. See below for details.


http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?style=printablefull=1#book_part1_chap3

Automatically Start Networking at Boot

To have your network interfaces activated at boot, you need to add them
to the default runlevel.

Code Listing 2.7: Adding net.eth0 to the default runlevel

# cd /etc/init.d
# ln -s net.lo net.eth0
# rc-update add net.eth0 default

If you have several network interfaces, you need to create the
appropriate net.* files just like you did with net.eth0.

If you later find out the assumption about the network interface name
(which we currently document as eth0) was wrong, then

 1. update the /etc/conf.d/net file with the correct interface name
(like enp3s0 instead of eth0),
 2. create new symbolic link (like /etc/init.d/net.enp3s0),
 3. remove the old symbolic link (rm /etc/init.d/net.eth0),
 4. add the new one to the default runlevel, and
 5. remove the old one using rc-update del net.eth0 default.




Re: [gentoo-user] Where is /etc/conf.d/net.example?

2014-03-16 Thread Alan McKinnon
On 16/03/2014 20:27, Chris Stankevitz wrote:


[snip]


 I'm using wicd now but I want to ditch wicd and replace it with the
 generally accepted correct gentoo way.
 
 Thank you,
 
 Chris
 
 
 


There is no generally accepted correct gentoo way, there is only
whatever you feel like using.

You have various choices

- an orthodox network manager like wicd or nm
- a minimal network manager like connman
- /etc/init.d/net* scripts supplied by OpenRc
- no manager, do it manually

OpenRc is the default for no real reason other than it is and has been
for some time. It can also be gotten to work in every case known to man,
the same can't be said for the other options.

If you want to ditch wicd because you think it's not the supported or
approved way, you might want to revisit that choice

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




Re: [gentoo-user] Where is /etc/conf.d/net.example?

2014-03-16 Thread Mick
On Sunday 16 Mar 2014 18:27:45 Chris Stankevitz wrote:
 Where is the proper place to specify the gentoo network configuration
 nowadays?
 
 I do not have a file called /etc/conf.d/net.example on my hard drive.
 That surprised me.

There used to be a /etc/conf.d/net.example, but that stopped some way back 
since sys-apps/openrc-0.12.4 I seem to recall.  I never understood why.  Since 
then every new openrc version updates its net.example file, but instead of 
doing so in /etc/conf.d/, it does it in /usr/share/doc/netifrc*/

BTW, this is the gentoo way only insofar that gentoo happens to use openrc.  
If wicd, networkmanager, connman suit your needs, there's no obligation to use 
openrc's scripts.

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] dracut: mount: special device /dev/disk/by-label/usr does not exist

2014-03-16 Thread Dale
Jc García wrote:



 2014-03-16 9:40 GMT-06:00 Dale rdalek1...@gmail.com
 mailto:rdalek1...@gmail.com:

 Jc García wrote:


 Is there some way to avoid this in the future without
 disabling file
 system check for /?


 Again, maybe UUIDs.

 I tried that once and grub didn't like it.  May need to see if
 things have improved in that area since. 



 For grub2 works fine for me, but the issue here was after grub had
 done its job, is the way dracut or more accurately the initrd, was
 trying to mount partitions before calling init.
 Not sure at all, but the fstab inside the initrd would have had
 something to do, so maybe, setting UUIDs in fstab and reconstructing
 the initrd, might prevent the issue from happening again.


I can't recall if I was on the old grub or the new grub.  I switched to
the new grub a while back but can't recall which came first.  H. 

On another note, we had another power fail and when I started up again,
it didn't complain about that problem.  Of course it didn't like the
shutdown since I wasn't here to do it and forgot to set it to start the
UPS driver stuff.  It was the same as a power plug pull.  Anyway, it
seems that when it has to fsck the / file system, it can't pick up from
there the same as it does when it doesn't need to do a fsck on /.  Bug
maybe???

Dale

:-)  :-) 

-- 
I am only responsible for what I said ... Not for what you understood or how 
you interpreted my words!



Re: [gentoo-user] dracut: mount: special device /dev/disk/by-label/usr does not exist

2014-03-16 Thread Dale
Neil Bothwick wrote:
 On Sun, 16 Mar 2014 09:05:01 -0600, Jc García wrote:

 Another related LVM question.  I have some partitions on LVM.  If I
 moved the drives to another system, would the new LVMs be found on the
 new system or is there some magic involved to find and get them
 mounted?  Example.  My /home is on its own LVM partition.  If I moved
 the drive that has that on it, would the new system see it or would I
 have to do something to make it see it?  I suspect and wouldn't want
 it to mount automatically.  I'd just want to be able to see it and
 mount it if needed.  Sort of a question I have always wondered about.

 On my experience as long, as udev and lvm are running on the receiving
 system, they should be found and placed for access under /dev, not
 mounted automatically.

 Unless there is already a VG on the other system with the same name. LVM
 doesn't handle VG name clashes, yet some distros still give them generic
 names.



This is good to know.  It seems this would work like I was thinking.  If
this rig were to die or something, I could unplug the drive with /home
from this system, hook up to my spare rig and go from there.  I may have
to mount it manually at first but hey, at least the data is still there.

Neato.  Thanks.

Dale

:-)  :-)

-- 
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!



[gentoo-user] Re: Where is /etc/conf.d/net.example?

2014-03-16 Thread eroen
On Sun, 16 Mar 2014 22:15:59 +0200, Alan McKinnon
alan.mckin...@gmail.com wrote:
 You have various choices
 
 - an orthodox network manager like wicd or nm
 - a minimal network manager like connman
 - /etc/init.d/net* scripts supplied by OpenRc
 - no manager, do it manually
 

Why doesn't anyone ever mention using dhcpcd for managing connections?
It and its accompanying openrc init script are installed on almost
every gentoo box anyway. For simple setups it should Just Work(TM)
out-of-box.

-- 
eroen


signature.asc
Description: PGP signature