LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-10-2016, 02:41 PM   #1
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
current, mkinitrd and uuid


Hi all,

I'm actually failing to have an initrd working with uuid for the resume device.

I run the mkinitrd_command_generator.sh, then replace /dev/sdX with "UUID=XXXXXX".

Then while I wake the computer up, boot messages claim that root has not been correctly unmounted, cleans up and reboot.

Anyone has such an initrd working (with uuid)?
Any advice would be welcome.

Last edited by Tonus; 04-10-2016 at 03:02 PM.
 
Old 04-10-2016, 03:13 PM   #2
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405

Original Poster
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
current, mkinitrd and uuid

Could it be that correct syntax would be resume=UUID=XXXXXX ?

I will have to test that...
 
Old 04-11-2016, 02:38 AM   #3
atelszewski.versades
Member
 
Registered: Oct 2014
Posts: 61

Rep: Reputation: Disabled
Hi,

Try something like this:
Code:
ROOTDEV="UUID=19b969e6-8e13-4b75-8554-e204d655e074"
RESUMEDEV="/dev/disk/by-uuid/84563c5a-bbab-4dde-8e88-083beddd3fbb"
in your mkinitrd.conf.

Pay attention on to how RESUMEDEV is specified.

--
Best regards,
Andrzej Telszewski
 
1 members found this post helpful.
Old 04-11-2016, 08:36 AM   #4
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405

Original Poster
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
current, mkinitrd and uuid

Thanks for your reply, I'll try this as soon as possible.
 
Old 04-11-2016, 01:31 PM   #5
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
Hi,

It basically boils down to how the initrd handles the devices:
Code:
$ grep RESUMEDEV /boot/initrd-tree/init
RESUMEDEV=$(cat /resumedev)
      RESUMEDEV=$(echo $ARG | cut -f2 -d=)
  if [ "$RESUMEDEV" != "" ]; then
    if ls -l $RESUMEDEV | grep -q "^l" ; then
      #RESUMEDEV=$(ls -l $RESUMEDEV | awk '{ print $NF }')
      RESUMEDEV=$(readlink -f $RESUMEDEV)
    echo "Trying to resume from $RESUMEDEV"
    RESMAJMIN=$(ls -l $RESUMEDEV | tr , : | awk '{ print $5$6 }')
Code:
$ grep ROOTDEV /boot/initrd-tree/init
ROOTDEV=$(cat /rootdev)
      ROOTDEV=$(echo $ARG | cut -f2 -d=)
      ROOTDEV=$(echo $ARG | cut -f2- -d=)
      ROOTDEV=$(echo $ARG | cut -f2- -d=)
        if echo $ROOTDEV | grep -q "LABEL=" || echo $ROOTDEV | grep -q "UUID=" ; then
        elif [ "x$ROOTDEV" = "x$(basename $ROOTDEV)" ]; then
          CRYPTDEV="$ROOTDEV"
        if [ "$ROOTDEV" = "$LUKSDEV" -o "$ROOTDEV" = "$CRYPTDEV" ] ; then
          ROOTDEV="/dev/mapper/$CRYPTDEV"
        if echo $ROOTDEV | grep -q "LABEL=" || echo $ROOTDEV | grep -q "UUID=" ; then
        elif [ "x$ROOTDEV" = "x$(basename $ROOTDEV)" ]; then
          CRYPTDEV="$ROOTDEV"
        if [ "$ROOTDEV" = "$LUKSDEV" -o "$ROOTDEV" = "$CRYPTDEV" ] ; then
          ROOTDEV="/dev/mapper/$CRYPTDEV"
  if echo $ROOTDEV | grep -q "LABEL=" || \
     echo $ROOTDEV | grep -q "UUID=" ; then
    ROOTDEV=$(findfs $ROOTDEV)
  mount -o ro -t $ROOTFS $ROOTDEV /mnt
So you can see that for the RESUMEDEV there is nothing about UUID.
You have to depend on device links provided by udev in /dev/disk/by-uuid/.

--
Best regards,
Andrzej Telszewski
 
1 members found this post helpful.
Old 04-11-2016, 04:39 PM   #6
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,405

Original Poster
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Much thanks for the hint, it works :-)

And additionnal thanks for the explanation !
 
Old 06-08-2016, 05:54 PM   #7
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
Hi,

As of Wed Jun 8 21:20:46 UTC 2016, support for UUID/LABEL for resume device has been added.

Neat

--
Best regards,
Andrzej Telszewski
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /dev/disk/by-uuid/<uuid here> does not exist and initramfs shell Mitt Green Linux - Kernel 4 08-03-2015 11:56 AM
Can mkinitrd unlock an encrypted device identified by uuid? michaelslack Slackware 3 03-28-2015 06:01 AM
[SOLVED] How to mount by-uuid if the device won't show in /dev/disk/by-uuid untill after blkid /dev/sd* ? masmddr Linux - General 4 01-10-2011 07:38 PM
Change UUID - Edit UUID using the dd command GMHilltop Linux - Newbie 10 10-28-2010 07:39 PM
Volume has problems including no uuid in /dev/disk/by-uuid abejarano Linux - Hardware 3 12-31-2008 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration