Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub2 + btrfs + Gentoo + boot
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
tps800
n00b
n00b


Joined: 25 Apr 2016
Posts: 4

PostPosted: Mon Apr 25, 2016 1:59 pm    Post subject: grub2 + btrfs + Gentoo + boot Reply with quote

Hi!

nachdem es im dritten Anlauf gelungen ist, btrfs+grub2+gentoo zu installieren bootet das System. Soweit so gut. ABER: das Ganze bleibt hängen. Letzte Meldung auf dem Bildschirm: "A start job is running for dev-sda3.device ( ... / no limit )". Daran ändert sich nichts, auch nicht nach Tagen.

Irgendeine Idee, warum das an dieser Stelle hängen bleibt?

Die Installation wurde nach den Aleitungen im Gentoo-Wiki durchgeführt:
- https://wiki.gentoo.org/wiki/Handbook:AMD64
- https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks

daran anschliessend wurde die Partition entsprechend vorbereitet:
Code:
parted /dev/sda mklabel gpt
parted /dev/sda mkpart ext2 1M 4M
parted /dev/sda set 1 flag bios_grub on
parted /dev/sda mkpart linux_swap 4M 4G
parted /dev/sda mkpart btrfs 4G 100%FREE


Als nächstes die btrfs subvolumes:
Code:
mkdir G
mount /dev/sda3 G
cd G
alias sbv='btrfs subvol create'
sbv @
mkdir -p @/boot/grub
sbv @/boot/grub/i386-pc
sbv @/boot/grub/x86_64-efi
mkdir -p @/var
mkdir -p @/var/lib/libvirt
sbv @/var/tmp
sbv @/var/opt
sbv @/var/spool
sbv @/var/crash
sbv @/var/log
sbv @/var/lib/mailman
sbv @/var/lib/mariadb
sbv @/var/lib/mysql
sbv @/var/lib/named
sbv @/var/lib/pgsql
sbv @/var/lib/libvirt/images
sbv @/opt
sbv @/tmp
sbv @/srv
sbv @/home
sbv @/.snapshots


Ist der Schritt getan:
Code:
cd
umount G
function mb() {
  mount -o subvol=/@$1 /dev/sda3 G/$1
}
mount subvol=/@ /dev/sda3 G
mb boot/grub/i386-pc
mb boot/grub/x86_64-efi
mb var/tmp
mb var/opt
mb var/spool
mb var/crash
mb var/log
mb var/lib/mailman
mb var/lib/mariadb
mb var/lib/mysql
mb var/lib/named
mb var/lib/pgsql
mb var/lib/libvirt/images
mb opt
mb tmp
mb srv
mb home
mb .snapshots


Das sieht dann etwa so aus:
Code:
mount
/dev/sda3 on /.snapshots type btrfs (rw,relatime,space_cache,subvolid=258,subvol=/@/.snapshots)
/dev/sda3 on /var/opt type btrfs (rw,relatime,space_cache,subvolid=274,subvol=/@/var/opt)
/dev/sda3 on /srv type btrfs (rw,relatime,space_cache,subvolid=263,subvol=/@/srv)
/dev/sda3 on /usr/local type btrfs (rw,relatime,space_cache,subvolid=265,subvol=/@/usr/local)
/dev/sda3 on /tmp type btrfs (rw,relatime,space_cache,subvolid=264,subvol=/@/tmp)
/dev/sda3 on /var/tmp type btrfs (rw,relatime,space_cache,subvolid=276,subvol=/@/var/tmp)
/dev/sda3 on /boot/grub2/x86_64-efi type btrfs (rw,relatime,space_cache,subvolid=261,subvol=/@/boot/grub2/x86_64-efi)
/dev/sda3 on /opt type btrfs (rw,relatime,space_cache,subvolid=262,subvol=/@/opt)
/dev/sda3 on /var/spool type btrfs (rw,relatime,space_cache,subvolid=275,subvol=/@/var/spool)
/dev/sda3 on /boot/grub2/i386-pc type btrfs (rw,relatime,space_cache,subvolid=260,subvol=/@/boot/grub2/i386-pc)
/dev/sda3 on /var/lib/pgsql type btrfs (rw,relatime,space_cache,subvolid=272,subvol=/@/var/lib/pgsql)
/dev/sda3 on /var/lib/named type btrfs (rw,relatime,space_cache,subvolid=271,subvol=/@/var/lib/named)
/dev/sda3 on /var/crash type btrfs (rw,relatime,space_cache,subvolid=266,subvol=/@/var/crash)
/dev/sda3 on /var/lib/mysql type btrfs (rw,relatime,space_cache,subvolid=270,subvol=/@/var/lib/mysql)
/dev/sda3 on /var/lib/mariadb type btrfs (rw,relatime,space_cache,subvolid=269,subvol=/@/var/lib/mariadb)
/dev/sda3 on /var/lib/mailman type btrfs (rw,relatime,space_cache,subvolid=268,subvol=/@/var/lib/mailman)
/dev/sda3 on /var/lib/libvirt/images type btrfs (rw,relatime,space_cache,subvolid=267,subvol=/@/var/lib/libvirt/images)
/dev/sda3 on /var/log type btrfs (rw,relatime,space_cache,subvolid=273,subvol=/@/var/log)
/dev/sda3 on /home type btrfs (rw,relatime,space_cache,subvolid=259,subvol=/@/home)


dann Stage3 auspacken mit:
Code:
tar -xvjpf stage3...tar.bz2 --xattrs -C /root/G


Anschliessend noch die infrastruktur mounten:
Code:
mount -t proc proc /root/G/proc
mount --rbind /dev /root/G/dev
mount --rbind /sys /root/G/sys
cp -L /etc/resolv.conf /root/G/etc/resolv.conf
chroot /root/G /bin/bash
env-update; source /etc/profile; export PS1="(chroot) $PS1"


von dort jetzt:
Code:
emerge-webrsync
emerge gentoo-sources
emerge vanilla-sources
emerge git-sources
emerge systemd
emerge dracut
emerge grub:2


Kernel compilieren, systemd kompilieren, beides konfigurieren.
Netzwerksetup via systemd
fstab setup:

Code:
UUID=bdb631e5-cd4f-4018-ad26-f83ce64b1826 swap swap defaults 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e / btrfs subvol=@ 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /boot/grub2/i386-pc btrfs subvol=@/boot/grub2/i386-pc 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /boot/grub2/x86_64-efi btrfs subvol=@/boot/grub2/x86_64-efi 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /opt btrfs subvol=@/opt 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /srv btrfs subvol=@/srv 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /tmp btrfs subvol=@/tmp 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /usr/local btrfs subvol=@/usr/local 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /var/crash btrfs subvol=@/var/crash 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /var/lib/libvirt/images btrfs subvol=@/var/lib/libvirt/images 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /var/lib/mailman btrfs subvol=@/var/lib/mailman 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /var/lib/mariadb btrfs subvol=@/var/lib/mariadb 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /var/lib/mysql btrfs subvol=@/var/lib/mysql 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /var/lib/named btrfs subvol=@/var/lib/named 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /var/lib/pgsql btrfs subvol=@/var/lib/pgsql 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /var/log btrfs subvol=@/var/log 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /var/opt btrfs subvol=@/var/opt 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /var/spool btrfs subvol=@/var/spool 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /var/tmp btrfs subvol=@/var/tmp 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /.snapshots btrfs subvol=@/.snapshots 0 0
UUID=240bc0cd-521a-4875-b01d-d99883f9452e /home btrfs subvol=@/home 0 0


Grub installieren und konfigurieren. Mit "dracut" wurde danach die initramfs erzeugt.
Beim ersten Boot in das System gab es ein Problem: keines der Subvolumes wurde gefunden. Nach ändern von "subvol=@..." nach "subvol=/@..." sowie einer Neuinstallation von Grub klappte es sofort! Das System bootet. Allerdings bleibt es jetzt konsequent bei der Meldung "A start job is running for dev-sda3.device" hängen.

Irgendwas fehlt oder ist nicht vorhanden und das System wartet. Leider gibt es keine Information darüber, was gerade nicht funktioniert ... :-(
Was fehlt dem System um zu booten?
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Mon Apr 25, 2016 4:59 pm    Post subject: Reply with quote

Wow, das ist eine be.... menge an Snapshots. Und ich bin mir ziemlich sicher, dass deine fstab und deine Struktur nicht den Effekt hat den du möchtest. Du mountest die Sub-Volumes auf sich selbst, es wundert mich, dass der Abschnitt mit dem "mb" funktioniert haben soll, den alles Subvolumes die du erzeugt hast sind Kinder von "@" und damit sind Sie bereits "gemountet", wenn du "@" mountest.

Das ganze macht so keinen Sinn.

Du versuchst also das Subvol auf das Subvol zu mounten, ohne es probiert zu haben, ist es wahrscheinlich das es dabei Probleme gibt.

In deiner fstab subvolid und subvol solltest auch jeweils nur eines angeben, ich bin mir nicht sicher was bei zwei Angaben passiert, vermutlich gewinnt die letzte (oder erste).

Bye
Py
Back to top
View user's profile Send private message
Klaus Meier
Advocate
Advocate


Joined: 18 Apr 2005
Posts: 2908
Location: Bozen

PostPosted: Mon Apr 25, 2016 5:01 pm    Post subject: Reply with quote

Das ist anhand deiner Informationen nicht so ganz einfach zu sagen.

Eine Möglichkeit: Nutzt du systemd? Dann hast du eventuell folgendes vergessen: ln -s /proc/self/mounts /etc/mtab

Weiter Möglichkeit: Du hast die fstab nicht richtig angepasst.
Back to top
View user's profile Send private message
tps800
n00b
n00b


Joined: 25 Apr 2016
Posts: 4

PostPosted: Tue Apr 26, 2016 8:08 am    Post subject: Reply with quote

Klaus Meier wrote:
Das ist anhand deiner Informationen nicht so ganz einfach zu sagen.

Eine Möglichkeit: Nutzt du systemd? Dann hast du eventuell folgendes vergessen: ln -s /proc/self/mounts /etc/mtab

Weiter Möglichkeit: Du hast die fstab nicht richtig angepasst.


Code:
cd /etc
ll mtab
lrwxrwxrwx 1 root root 19 24. Apr 13:00 mtab -> ../proc/self/mounts


Also das ist es nicht. In /etc/fstab:
Code:
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 / btrfs subvol=/@ 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /.snapshots btrfs subvol=/@/.snapshots 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /boot/grub/i386-pc btrfs subvol=/@/boot/grub/i386-pc 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /boot/grub/x86_64-efi btrfs subvol=/@/boot/grub/x86_64-efi 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /opt btrfs subvol=/@/opt 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /srv btrfs subvol=/@/srv 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /tmp btrfs subvol=/@/tmp 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /usr/local btrfs subvol=/@/usr/local 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /usr/portage btrfs subvol=/@/usr/portage 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /usr/portage/distfiles btrfs subvol=/@/usr/portage/distfiles 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /usr/portage/packages btrfs subvol=/@/usr/portage/packages 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /usr/portage/build-tmp btrfs subvol=/@/usr/portage/build-tmp 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /usr/src btrfs subvol=/@/usr/src 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /var/crash btrfs subvol=/@/var/crash 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /var/log btrfs subvol=/@/var/log 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /var/opt btrfs subvol=/@/var/opt 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /var/spool btrfs subvol=/@/var/spool 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /var/tmp btrfs subvol=/@/var/tmp 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /var/lib/libvirt/images btrfs subvol=/@/var/lib/libvirt/images 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /var/lib/mailman btrfs subvol=/@/var/lib/mailman 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /var/lib/mariadb btrfs subvol=/@/var/lib/mariadb 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /var/lib/mysql btrfs subvol=/@/var/lib/mysql 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /var/lib/named btrfs subvol=/@/var/lib/named 0 0
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 /var/lib/pgsql btrfs subvol=/@/var/lib/pgsql 0 0

UUID=b2440022-18c4-495f-97ff-b71321713a9e /home xfs defaults 1 2
UUID=d7dde193-6dc8-4abd-ba67-a00cc7c6bb1f none swap sw 0 0


systemd sollte sich um /proc, /dev und /sys kümmern ...


/var/log/dmesg:
Code:
[    3.996584] BTRFS: device fsid 33709faa-f386-4ff0-b20c-60beb9a8fe74 devid 1 transid 435 /dev/sda3
[    3.998802] BTRFS info (device sda3): disk space caching is enabled
[    3.998908] BTRFS: has skinny extents
[    4.022400] usb 2-2: New USB device found, idVendor=0e0f, idProduct=0002
[    4.022505] usb 2-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    4.022611] usb 2-2: Product: VMware Virtual USB Hub
[    4.023824] hub 2-2:1.0: USB hub found
[    4.024136] hub 2-2:1.0: 7 ports detected
[    4.382197] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input5
[    4.382251] ACPI: Power Button [PWRF]
[    4.392200] ACPI: Deprecated procfs I/F for AC is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared
[    4.392266] ACPI: AC Adapter [ACAD] (on-line)
[    4.416903] parport_pc 00:04: reported by Plug and Play ACPI
[    4.417056] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[    4.462646] Floppy drive(s): fd0 is 1.44M
[    4.479724] FDC 0 is a post-1991 82077
[    4.515897] agpgart-intel 0000:00:00.0: Intel 440BX Chipset
[    4.516085] agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0x0
[    4.520864] piix4_smbus 0000:00:07.3: SMBus Host Controller not enabled!
[    4.526968] e1000 0000:02:01.0 enp2s1: renamed from eth0
[    4.600977] input: PC Speaker as /devices/platform/pcspkr/input/input6
[    4.649679] ppdev: user-space parallel port driver
[    4.709184] blk_update_request: I/O error, dev fd0, sector 0
[    4.709188] floppy: error -5 while reading block 0
[    4.810360] BTRFS info (device sda3): disk space caching is enabled
[    4.889764] Adding 4194300k swap on /dev/sda2.  Priority:-1 extents:1 across:4194300k
[    5.589825] XFS (sda4): Mounting V5 Filesystem
[    5.609612] XFS (sda4): Ending clean mount


Sieht auch soweit OK aus. Es werden die Filesysteme '/', '/home' gemounted.

Systemd schreibt nur nichts irgendwo hin, wo es auch auswertbar wäre -- die dazu notigen Verzeichnisse sind noch nicht gemounted. Sieht so aus, als ob der kernel es fertigbringt "/dev/sda3" auf "/" zu mounten, aber systemd dann beliebig lange auf das device "/dev/sda3" wartet ...
Back to top
View user's profile Send private message
tps800
n00b
n00b


Joined: 25 Apr 2016
Posts: 4

PostPosted: Tue Apr 26, 2016 8:19 am    Post subject: Reply with quote

py-ro wrote:
Wow, das ist eine be.... menge an Snapshots. Und ich bin mir ziemlich sicher, dass deine fstab und deine Struktur nicht den Effekt hat den du möchtest. Du mountest die Sub-Volumes auf sich selbst, es wundert mich, dass der Abschnitt mit dem "mb" funktioniert haben soll, den alles Subvolumes die du erzeugt hast sind Kinder von "@" und damit sind Sie bereits "gemountet", wenn du "@" mountest.

Das ganze macht so keinen Sinn.

Du versuchst also das Subvol auf das Subvol zu mounten, ohne es probiert zu haben, ist es wahrscheinlich das es dabei Probleme gibt.


Nein, versuche ich nicht. Der Mount
Code:
mount -o subvol=/@ /dev/sda3 /

ist in fstab:
Code:
UUID=33709faa-f386-4ff0-b20c-60beb9a8fe74 / btrfs subvol=/@ 0 0

mounted die weiteren angelegten subvolumes nicht! D.h. die Verzeichnisse /opt, /tmp, /boot/grub/i386-pc, /boot/grub/x86_64-efi, ... sind sämtlich leer. Erst die folgenden Mounts füllen sie mit Inhalt (mount ist nicht rekursiv). Vorteil der verschiedenen Subvolumes: ich kann /opt, /tmp, usw. unterschiedlich behandeln. zum Beispiel keine snapshots von /var/log anfertigen, die bei einem Rollback das alte log löschen würden. Oder für mysql, mariadb, pgsql cow abschalten und für andere subvolumes compression einschalten und, und, und.

py-ro wrote:
In deiner fstab subvolid und subvol solltest auch jeweils nur eines angeben, ich bin mir nicht sicher was bei zwei Angaben passiert, vermutlich gewinnt die letzte (oder erste).

Der "mount"-Befehl leifert beides. beim mounten selbst ist die subvolid nicht hilfreich: sie kommt immer mehrfach vor.
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Tue Apr 26, 2016 9:22 am    Post subject: Reply with quote

Wenn die subvolid mehrfach, für verschiedene Subvolumes, vorkommt, ist was kaputt.

Warum du soviele Subvolumes anlegst ist mir schon klar.

Wenn das mit den Submounts leer stimmt, dann sind die nicht so angelegt wie, im ersten Posting beschrieben, bzw. du hast nicht "/" im Namen verwendet oder?
Back to top
View user's profile Send private message
tps800
n00b
n00b


Joined: 25 Apr 2016
Posts: 4

PostPosted: Tue Apr 26, 2016 3:57 pm    Post subject: Reply with quote

py-ro wrote:
Wenn das mit den Submounts leer stimmt, dann sind die nicht so angelegt wie, im ersten Posting beschrieben, bzw. du hast nicht "/" im Namen verwendet oder?

Nein. "/" ist nicht Teil des Namens.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum