FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 20
  1. #1
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    17

    Angry Emergency mode save .txt - no way to list disks

    For unknown reason I am unable to boot and and I am dropped into Emergency mode. Problem is I can't even start troubleshhoting because it appears to be impossible to save the rdsosreport.txt file as instructed in the shell itself! I cannot find a single shred of documentation on how to save it, specifically how to list devices/partitions to find the one to mount. I see no documentation relating to available commands in Emergency shell so I have no idea if there is indeed some command available to list partitions. lsblk and df commands are not available in Emergency shell.

    How can I mount a usb drive in Emergency shell without the ability to list storage devices? Is there a list of available commands in Emergency shell?

  2. #2
    Join Date
    Nov 2008
    Posts
    415

    Re: Emergency mode save .txt - no way to list disks

    See https://access.redhat.com/documentat.../ap-rescuemode.

    Looks promising. I've never tried it.

  3. #3
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    17

    Re: Emergency mode save .txt - no way to list disks

    Quote Originally Posted by dswaner
    See https://access.redhat.com/documentat.../ap-rescuemode.

    Looks promising. I've never tried it.
    It just mentions how to enter emergency mode, no documentation on how to use it whatsoever.

  4. #4
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    17

    Re: Emergency mode save .txt - no way to list disks

    I did not find a reasonable solution to saving the a file from Emergency Mode but I did find a hacky way to get it done. I would call Emergency mode broken as it does not have a command to list storage devices, at least help menu does not list it.

    In the end I listed connected devices like so:

    cd /dev
    ls -lrta | grep sd*

    Then I randomly picked what I reasonably suspected was one of the several data drives and mounted the device like so:

    mkdir /datadsk
    mount /dev/sd? /datadsk

    Finally I copied the file, unmouted and rebooted.

    cp /run/initramfs/rdsosreport.txt /datadsk
    umount /datadsk
    exit

    CTRL+ALT+DEL to reboot

    To move the file off the system data disk I had to boot with a live image and copy the file to a usb drive.
    Last edited by dominicm; 17th December 2017 at 06:12 PM.

  5. #5
    Join Date
    Nov 2008
    Posts
    415

    Re: Emergency mode save .txt - no way to list disks

    Quote Originally Posted by dominicm
    It just mentions how to enter emergency mode, no documentation on how to use it whatsoever.
    Well, even that doesn't work for me. Adding "emergency" to the boot line just causes a hang at "Starting Switch Root" - tried with 3 different kernels (F27 and F26).

    I thought that some of the commands specified in the sited URL re rescue mode would also work in emergency mode - and you have proven that they do.

    The next time I see emergency mode maybe I'll try your solution to investigate, instead of just reinstalling.

    Additional thought:

    From that URL, it sounded like you could do a chroot /mnt/sysimage to make other commands (like rpm) available - presumably that would include the lsblk command? Or does that only apply to rescue mode?
    Last edited by dswaner; 17th December 2017 at 04:50 PM. Reason: Additional thought

  6. #6
    Join Date
    Oct 2011
    Posts
    1,798

    Re: Emergency mode save .txt - no way to list disks

    Since you are operating in initramd environment, utilities that are available there are limited. Still, you can find information about partitions using `blkid` command.

  7. #7
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    17

    Re: Emergency mode save .txt - no way to list disks

    I never tried entering emergency mode on purpose so can't comment on that. Reinstalling wasn't really an option, way too much config and app installs to deal with...

    I did chroot several times but that was from a bootable usb which is no good since /run dir gets deleted every reboot. I am also not ware of a way to reinstall base fedora like you can with arch for example with pacman -S base base-devel. In my case it was a bug that was fixed by replacing symlink with a copy of a file. Pretty nasty of Fedora, not reliable at all...
    Last edited by dominicm; 17th December 2017 at 06:17 PM.

  8. #8
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    17

    Re: Emergency mode save .txt - no way to list disks

    Like I said before there are no commands for listing disks, at least according to help command and my limited trials. df, lsblk or blkid are not valid commands in emergency mode.

  9. #9
    Join Date
    Nov 2008
    Posts
    415

    Re: Emergency mode save .txt - no way to list disks

    FWIW: In order to boot into emergency mode on purpose, at this time adding the boot parameter "rd.emergency", or "rd.systemd.unit=emergency.target" works for me (F27). The following boot parameters (documented in that URL and / or in the man pages) do not work for me at this time: "emergency", "-b", "systemd.unit=emergency.target" - they all hang at a "Starting Switch Root" message. And just doing a "chroot /mnt/sysimage" does not work in emergency mode. Now if you: 1) create a directory; 2) mount a root partition on it; 3) then chroot to it, maybe it would work. I think I'll stick with just reinstalling.

  10. #10
    Join Date
    Jul 2013
    Location
    UK
    Posts
    28

    Re: Emergency mode save .txt - no way to list disks

    Since few days I've got the same, end even (worse) more.
    My two Fedoras don't want to boot anymore from the same idiotic reason - emergency mode. They are installed on different partitions.
    What's more - all my three previous DVDs live - boot, yes - but stop after some time, or show... emergency mode (!?).
    Newest F27 - installer of which I've put to USB stick and booted... lol.. emergency mode again.

    All started to happen when I've put WIn10 installation USB pendrive, booted PC and noticed that... simply removed flash drive, did hard reset and voila... ESP partition got screwed (no content, I had to reinstall rEFInd manually). My BIOS boot queue is screwed as well, I have no control what boots and how lol - EFI shell shows whenever it likes during bootup. Windows works fine, of course. But none of my Fedoras - from 3 different sources (hard drive, DVD and USB drive). Looks like OS end of life ;-)

  11. #11
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    17

    Re: Emergency mode save .txt - no way to list disks

    Did you look at the rdsosreport.txt? Look towards the end of the log for any errors, if it's same bug as was for me it's very easy to fix as I documented above. I used live usb but it was Workstation not server with no issues. Are you sure it's not just booting into your broken Fedora install instead of the live usb? Verify by removing all other drives.

  12. #12
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,166

    Re: Emergency mode save .txt - no way to list disks

    If your system can run blkid then it can provide you the information you desire.
    blkid /dev/sd* works for all disks blkid /dev/sda* for the /dev/sda

    I have used blkid to correct /etc/fstab errors.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  13. #13
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    17

    Re: Emergency mode save .txt - no way to list disks

    Again, lsblk or blkid doesn't work in emergency mode...

  14. #14
    Join Date
    Nov 2008
    Posts
    415

    Re: Emergency mode save .txt - no way to list disks

    In emergency mode blkid doesn't work for USB drives (unless you mount the USB?), but works fine for a hard drive. lsblk gives "command not found".

  15. #15
    Join Date
    Jun 2017
    Location
    Ireland
    Posts
    17

    Re: Emergency mode save .txt - no way to list disks

    blkid doesnt work, full stop. blkid without any parameters should list all drives. In emergency mode it simply returns "command not found" error. I don't understand why it's still not clear, blk id is not even listed in help command output, so I don't see any reason to think it might work.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Boot goes to emergency mode due to....
    By Gh0zt36 in forum Installation, Upgrades and Live Media
    Replies: 33
    Last Post: 3rd May 2017, 10:03 PM
  2. Emergency mode in Fedora 25
    By mackissack in forum Using Fedora
    Replies: 3
    Last Post: 1st January 2017, 03:31 AM
  3. Emergency Mode!
    By kunkumd in forum Using Fedora
    Replies: 2
    Last Post: 17th June 2016, 03:43 PM
  4. Emergency mode
    By thrivingcot in forum Using Fedora
    Replies: 1
    Last Post: 17th October 2013, 07:26 PM
  5. [SOLVED]
    Emergency mode
    By mmehrwald in forum Using Fedora
    Replies: 3
    Last Post: 22nd August 2012, 01:00 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •