3

Recentley i installed another linux distro on another partition on my SSD disk. During the instalation i reinstalled grub on the computer, and ever since my Ubuntu OS has been very slow to boot up. This has never been an issue before , and im very qurious to find out what is causing it.

Before this, the boot has been very fast. As soon as i log in the ssd seems to work fine, no change i behaviour.

I reinstalled grub on my ubuntu distro and now grub displayes Ubuntu and an old linux mint distro i have deleted to make room for a new one.

I followwed another solution changing the UUID in /etc/fstab, by baking up the original and creating a new one.

I ran:

sudo vim /etc/fstab

This file was empty so I entered the UUID for the swap memory partition. Now I'm stuck in tty1.

I've tried to reinstall Ubuntu desktop, ctrl + alt +f7, tried to run sudo /etc/init.d/gdm restart nothing works. I've checked a lot of similar issues "stuck in tty1" etc. nothing is working.

Trying to fix the /etc/fstab.bak file by running:

sudo cp /etc/fstab.bak /etc/fstab

is not working beacause i only get "read-only" in the tty1 output. Please help, i dont want to reinstall my OS.

Update: I tried following this answer, but every terminal command in the answer gives output like: this doesnt exist, no such directory etc.

I've looked at several similar tty1 issues/post and i'm still stuck.

  • I had the same problem. Try my solution and see if it works. – Raphael Sep 14 '16 at 16:42
  • I did the changes to the grub-file, but where do i find the output(process) you refered to in your solution? – Øystein Seel Sep 14 '16 at 16:56
  • From Ubuntu try 'sudo grub-install /dev/sda' – WinEunuuchs2Unix Sep 14 '16 at 17:27
  • well i didnt help the boot up speed, and now i have to enter the BIOS to boot in the other distro. My grub now displayes Ubuntu and an old Linux mint distro i deleted to make room for the new one. – Øystein Seel Sep 14 '16 at 17:32
  • @Steingrim - Do this: sudo cp /etc/fstab.bak /etc/fstab from your tty and then reboot your system, then follow the steps from 4. – Raphael Sep 14 '16 at 18:25
  • It says cannot create regular file, because of read-only file system – Øystein Seel Sep 14 '16 at 18:27
  • 1
    @Steingrim - From GRUB menu boot into recovery mode, then type sudo blkid and note the partition number of your Ubuntu partition something like: /dev/sdaX. Then run - mount -t ext4 -o rw,remount /dev/sdaX /. Now, issue the command: sudo cp /etc/fstab.bak /etc/fstab. Now, reboot to Ubuntu and follow from step 4. – Raphael Sep 14 '16 at 18:52
  • Very much Related : http://askubuntu.com/questions/737319/ubuntu-is-booting-very-slowly-after-dual-boot-with-kali – Severus Tux Sep 15 '16 at 16:51

2 Answers2

3

Well you didn't have to follow the steps from my answer exactly. But here is a detailed way to recover your system from the slow boot:

  1. Undo the GRUB modification:

    • Open GRUB:

      sudo nano /etc/default/grub
      
    • Change this line:

      GRUB_CMDLINE_LINUX_DEFAULT=
      

      to

      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
      
    • Now save the file and exit: Ctrl + O, then Enter and Ctrl + X.

    • Update GRUB:

      sudo grub-mkconfig -o /boot/grub/grub.cfg
      
  2. Now, open a terminal and type:

    sudo blkid
    

    and note down the UUID of your swap partition. The output will have a line that looks something like:

    /dev/sda6: UUID="727cac18-044b-4504-87f1-a5aefa774bda" TYPE="swap" PARTUUID="8rof66hg-12"
    

ITS BETTER TO COPY THE UUID PART FROM THE ABOVE OUTPUT, i.e., 727cac18-044b-4504-87f1-a5aefa774bda


  1. BACKUP YOUR EXISTING FSTAB FIRST BY TYPING THE FOLLOWING COMMAND:

    sudo cp /etc/fstab /etc/fstab.bak
    
    • 3a. Next, open your etc/fstab file:

      sudo nano /etc/fstab
      
  2. Repalce the UUID of the existing swap partition with the one that you copied earlier, i.e., change

    UUID=whateverishere none        swap        defaults    0 0
    

    to

    UUID=727cac18-044b-4504-87f1-a5aefa774bda   none        swap        defaults    0 0
    
  3. Now save the file and exit: Ctrl + O, then Enter and Ctrl + X.

  4. Reboot.

Raphael
  • 8,035
0

This answer gave me the idea to boot from usb disk image. From there none of the provided terminal codes worked expect mounting the partition i couldnt access.

Then i accessed my partition from:

/media

found the fstab file and followed the provided answer above.