Atualizar

Atualizar

Recentemente substituí um SSD por um SSD maior. eu useiClonezillapara clonar o disco antigo para o novo. Depois disso eu useiGParted ao vivopara redimensionar a partição existente, empurrando a partição swap para o final do disco. Também atualizei do Ubuntu 16.04 para 18.04.

Depois de concluir com êxito as etapas acima, percebo que oo tempo de inicialização ficou muito mais longo. Encontrei alguns tópicos semelhantes (link abaixo) e tentei o que é sugerido lá. No entanto, o tempo de inicialização não foi reduzido ao valor antes da alteração do disco.

Aqui está o meu original /etc/fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=e15b2ef7-c32d-46f5-a3a8-4bdc60285b4e /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=3a0c2581-52f2-4c92-9c4a-09d3f0258c05 none            swap    sw              0       0
/dev/disk/by-id/usb-Generic_USB_Flash_Disk-0:0 /mnt/usb-Generic_USB_Flash_Disk-0:0 auto nosuid,nodev,nofail,x-gvfs-show 0 0

Eu já substituí o UUIDda swappartição olhando para oblkidsaída do comando:

/dev/sda1: UUID="e15b2ef7-c32d-46f5-a3a8-4bdc60285b4e" TYPE="ext4" PARTUUID="000d7e8b-01"
/dev/sda5: LABEL="swap" UUID="839f9d78-77b2-491d-808d-8cd551a9eeef" TYPE="swap" PARTUUID="000d7e8b-05"

Também comentei /dev/disk/by-id/usb-..porque acredito que este foi o pendrive a partir do qual inicializei o GParted Live. Não faço ideia por que ainda está definido lá.

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=e15b2ef7-c32d-46f5-a3a8-4bdc60285b4e /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
# UUID=3a0c2581-52f2-4c92-9c4a-09d3f0258c05 none            swap    sw              0       0
UUID=839f9d78-77b2-491d-808d-8cd551a9eeef none            swap    sw              0       0
# /dev/disk/by-id/usb-Generic_USB_Flash_Disk-0:0 /mnt/usb-Generic_USB_Flash_Disk-0:0 auto nosuid,nodev,nofail,x-gvfs-show 0 0

O /var/log/boot.logmostra o seguinte:

         Starting Tell Plymouth To Write Out Runtime Data...
[  OK  ] Started Braille Device Support.
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Starting Load/Save RF Kill Switch Status...
[  OK  ] Started Braille Device Support.
[  OK  ] Started Load/Save RF Kill Switch Status.
[  OK  ] Reached target Sound Card.
[  OK  ] Started Braille Device Support.
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Raise network interfaces.
[ TIME ] Timed out waiting for device dev-disk-by\x2did-usb\x2dGeneric_USB_Flash_Disk\x2d0:0.device.
[DEPEND] Dependency failed for /mnt/usb-Generic_USB_Flash_Disk-0:0.
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-3a0c2581\x2d52f2\x2d4c92\x2d9c4a\x2d09d3f0258c05.device.
[DEPEND] Dependency failed for /dev/disk/by-uuid/3a0c2581-52f2-4c92-9c4a-09d3f0258c05.
[DEPEND] Dependency failed for Swap.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Listening on PC/SC Smart Card Daemon Activation Socket.
[  OK  ] Started Daily apt download activities.
...

Oanálise do systemdcomando diz:

Startup finished in 36.037s (kernel) + 10.847s (userspace) = 46.885s
graphical.target reached after 10.835s in userspace

O que posso fazer para melhorar o tempo de inicialização?

Atualizar

Pesquisei /var/log/boot.lognovamente hoje e encontrei esta saída - observe otempo esgotadoao procurar um dispositivo!:

         Starting Tell Plymouth To Write Out Runtime Data...
[  OK  ] Started Braille Device Support.
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
         Starting Load/Save RF Kill Switch Status...
[  OK  ] Started Braille Device Support.
[  OK  ] Started Load/Save RF Kill Switch Status.
[  OK  ] Reached target Sound Card.
[  OK  ] Started Braille Device Support.
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Raise network interfaces.    
[*     ] (1 of 2) A start job is running for dev-disk-by\x2did-usb\x2dGeneric_
[**    ] (1 of 2) A start job is running for dev-disk-by\x2did-usb\x2dGeneric_
[***   ] (1 of 2) A start job is running for dev-disk-by\x2did-usb\x2dGeneric_
[ ***  ] (2 of 2) A start job is running for dev-disk-by\x2duuid-3a0c2581\x2d5
[  *** ] (2 of 2) A start job is running for dev-disk-by\x2duuid-3a0c2581\x2d5
[   ***] (2 of 2) A start job is running for dev-disk-by\x2duuid-3a0c2581\x2d5
[    **] (1 of 2) A start job is running for dev-disk-by\x2did-usb\x2dGeneric_
[     *] (1 of 2) A start job is running for dev-disk-by\x2did-usb\x2dGeneric_
[    **] (1 of 2) A start job is running for dev-disk-by\x2did-usb\x2dGeneric_
[   ***] (2 of 2) A start job is running for dev-disk-by\x2duuid-3a0c2581\x2d5
[  *** ] (2 of 2) A start job is running for dev-disk-by\x2duuid-3a0c2581\x2d5
[ ***  ] (2 of 2) A start job is running for dev-disk-by\x2duuid-3a0c2581\x2d5
[***   ] (1 of 2) A start job is running for dev-disk-by\x2did-usb\x2dGeneric_
[**    ] (1 of 2) A start job is running for dev-disk-by\x2did-usb\x2dGeneric_
[*     ] (1 of 2) A start job is running for dev-disk-by\x2did-usb\x2dGeneric_
[**    ] (2 of 2) A start job is running for dev-disk-by\x2duuid-3a0c2581\x2d5
[***   ] (2 of 2) A start job is running for dev-disk-by\x2duuid-3a0c2581\x2d5
[ ***  ] (2 of 2) A start job is running for dev-disk-by\x2duuid-3a0c2581\x2d5
[  *** ] (1 of 2) A start job is running for dev-disk-by\x2did-usb\x2dGeneric_
...
[ TIME ] Timed out waiting for device dev-disk-by\x2did-usb\x2dGeneric_USB_Flash_Disk\x2d0:0.device.
[DEPEND] Dependency failed for /mnt/usb-Generic_USB_Flash_Disk-0:0.
[ TIME ] Timed out waiting for device dev-disk-by\x2duuid-3a0c2581\x2d52f2\x2d4c92\x2d9c4a\x2d09d3f0258c05.device.
[DEPEND] Dependency failed for /dev/disk/by-uuid/3a0c2581-52f2-4c92-9c4a-09d3f0258c05.
[DEPEND] Dependency failed for Swap.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on UUID daemon activation socket.
[  OK  ] Listening on PC/SC Smart Card Daemon Activation Socket.
...

Relacionado

Responder1

Suspeito que exista um arquivo de 'currículo'

/etc/initramfs-tools/conf.d/resume

que aponta para o UUID que não foi mais encontrado. Você pode modificar esse arquivo para apontar para o UUID correto para a partição swap e executar

sudo update-initramfs -u

Veja os comentários nº 16 e nº 17 no link a seguir para um relatório de bug,

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1763611


Há uma diferença entre o seu caso e o caso no relatório de bug,

  • no seu caso você está usando uma partição swap
  • no caso do relatório de bug, um arquivo swap é usado (portanto, não há partição swap, que deva ser apontada).

informação relacionada