Export to GitHub

chromium-os - issue #5938

AU: work with signed rootfs


Posted on Aug 20, 2010 by Helpful Hippo

The update engine probably needs to be updated now that rootdev doesn't return /dev/sda[35].

Will, how do we get the install partition? (being sda3 or sda5). I don't mind making the fix if you answer that question

Comment #1

Posted on Aug 20, 2010 by Helpful Monkey

Attaching some information. This is blocking testing on ARM.

Attachments

Comment #2

Posted on Aug 20, 2010 by Happy Giraffe

I see this in chromeos_startup:

ROOT_DEV=$(rootdev) # On verified boot, we get the real root from the dm slaves. if [ "$ROOT_DEV" = "/dev/dm-0" ]; then ROOT_DEV="/dev/$(basename /sys/block/dm-0/slaves/*)" fi

Comment #3

Posted on Aug 20, 2010 by Helpful Monkey

Seems like that is broken; rootdev returns "/dev/mapper/vroot" now. Wouldn't it be best to put the fix into rootdev, that way we don't have to track down every call to rootdev and fix it.

Comment #4

Posted on Aug 20, 2010 by Happy Panda

(No comment was entered for this change.)

Comment #5

Posted on Aug 21, 2010 by Helpful Hippo

(No comment was entered for this change.)

Comment #6

Posted on Aug 23, 2010 by Grumpy Ox

Comment deleted

Comment #7

Posted on Aug 23, 2010 by Grumpy Ox

wfrichar and I have discussed adding a few features to rootdev. I hadn't realized we were modifying its code. Anyway, it is crucial that rootdev return the actual root device. But we should add a flag like "-d" for dereference which can be used when we don't care if the rootdev is a dm-verity device or a real one.

There are several legitimate scripts that would break if we "just" fixed rootdev. Looking at the slave in /sys or by calling 'dmsetup deps' will yield the right info. If getting this into rootdev is a priority now, then it's worth adding task for that.

That aside, is the update_engine actually calling rootdev?

Comment #8

Posted on Aug 23, 2010 by Helpful Dog

Another option is to change the name of the device depending on use: /dev/mapper/vbd3 vbd5 or vroot (for non-updateable cases)

Seems like the wrong approach though.

Comment #9

Posted on Aug 23, 2010 by Happy Giraffe

Ideally, rootdev would also provide librootdev that update_engine other C/C++ clients can use. In the meantime, update_engine could probably invoke rootdev as an external utility? I don't think right now update_engine is using rootdev though.

Comment #10

Posted on Aug 23, 2010 by Happy Bird

Will, You're right update engine scrubs /proc/cmdline itself, in utils.cc. I'm not sure why I thought it shelled out to rootdev.

Comment #11

Posted on Aug 23, 2010 by Quick Monkey

This is blocking our test automation on internal builds too, since update_engine on the interal build (signed build) would not work at all.

Comment #12

Posted on Aug 26, 2010 by Grumpy Ox

I've rewritten rootdev pending feedback. We can pull it into update_engine if desirable.

Can anyone pick up the update_engine integration bit once #5988 is in?

Comment #13

Posted on Aug 26, 2010 by Helpful Hippo

(No comment was entered for this change.)

Comment #14

Posted on Aug 30, 2010 by Grumpy Ox

(No comment was entered for this change.)

Comment #15

Posted on Aug 30, 2010 by Happy Giraffe

Commit: 79275f549f15605714b517499edef5cdb8ef7eff Email: wad@chromium.org

update_engine,rootdev: atomically add librootdev and add update_engine deps Adds librootdev to /usr/lib and rootdev.h to /usr/include. Makes update_engine RDEP on rootdev.

This will make it safe for the update_engine change to land which uses the new librootdev.

TEST=built both with these ebuilds aqnd cros_workon BUG=chromium-os:5938

Change-Id: Ia2a0e84d171689f1bd0111a4c699930c5764c850

Review URL: http://codereview.chromium.org/3262006

D chromeos-base/update_engine/update_engine-0.0.1-r51.ebuild A chromeos-base/update_engine/update_engine-0.0.1-r52.ebuild M chromeos-base/update_engine/update_engine-9999.ebuild D sys-apps/rootdev/rootdev-0.0.1-r3.ebuild A sys-apps/rootdev/rootdev-0.0.1-r4.ebuild M sys-apps/rootdev/rootdev-9999.ebuild

Comment #16

Posted on Aug 30, 2010 by Happy Giraffe

Commit: 8f71da83a3ecb7568769705486ea26be06a9d108 Email: wad@chromium.org

update_engine: use librootdev Rewrote BootDevice() to call rootdev() with full resolution enabled. BootDevice() was crawling /proc/cmdline while rootdev() uses /sys. We should have both /proc and /sys normally so hopefully this is a minor change to get us to a working updater over dm-verity.

TEST=none yet. BUG=chromium-os:5938

Change-Id: I7ee654d5b429d67d65e9729210ef839c58fa1d34

Review URL: http://codereview.chromium.org/3232004

M SConstruct M utils.cc

Comment #17

Posted on Aug 30, 2010 by Helpful Cat

(No comment was entered for this change.)

Comment #18

Posted on Aug 30, 2010 by Grumpy Ox

ready for verification.

Comment #19

Posted on Aug 30, 2010 by Happy Giraffe

Commit: e7f9ce873390bb88df472f413fb683a294cc9716 Email: petkov@chromium.org

Add rootdev to AU's dev packages. BUG=5938 TEST=ran ./setup_dev_packages and CFLAGS=-O1 ./gen_coverage_html.sh

Change-Id: I0c47254c96d06e31345c42bd41f157588292b587

Review URL: http://codereview.chromium.org/3238013

M setup_dev_packages

Comment #20

Posted on Aug 30, 2010 by Happy Giraffe

Commit: 8566b7bb99446d3bb297eeff65a7e1ca0b59fa95 Email: wad@chromium.org

update_engine: use librootdev Rewrote BootDevice() to call rootdev() with full resolution enabled. BootDevice() was crawling /proc/cmdline while rootdev() uses /sys. We should have both /proc and /sys normally so hopefully this is a minor change to get us to a working updater over dm-verity.

TEST=none yet. BUG=chromium-os:5938

Change-Id: I7ee654d5b429d67d65e9729210ef839c58fa1d34

Review URL: http://codereview.chromium.org/3232004

M SConstruct M utils.cc

Comment #21

Posted on Aug 31, 2010 by Happy Giraffe

Commit: e7f9ce873390bb88df472f413fb683a294cc9716 Email: petkov@chromium.org

Add rootdev to AU's dev packages. BUG=5938 TEST=ran ./setup_dev_packages and CFLAGS=-O1 ./gen_coverage_html.sh

Change-Id: I0c47254c96d06e31345c42bd41f157588292b587

Review URL: http://codereview.chromium.org/3238013

M setup_dev_packages

Comment #22

Posted on Aug 31, 2010 by Happy Giraffe

Commit: 8566b7bb99446d3bb297eeff65a7e1ca0b59fa95 Email: wad@chromium.org

update_engine: use librootdev Rewrote BootDevice() to call rootdev() with full resolution enabled. BootDevice() was crawling /proc/cmdline while rootdev() uses /sys. We should have both /proc and /sys normally so hopefully this is a minor change to get us to a working updater over dm-verity.

TEST=none yet. BUG=chromium-os:5938

Change-Id: I7ee654d5b429d67d65e9729210ef839c58fa1d34

Review URL: http://codereview.chromium.org/3232004

M SConstruct M utils.cc

Comment #23

Posted on Sep 1, 2010 by Happy Giraffe

Commit: 8566b7bb99446d3bb297eeff65a7e1ca0b59fa95 Email: wad@chromium.org

update_engine: use librootdev Rewrote BootDevice() to call rootdev() with full resolution enabled. BootDevice() was crawling /proc/cmdline while rootdev() uses /sys. We should have both /proc and /sys normally so hopefully this is a minor change to get us to a working updater over dm-verity.

TEST=none yet. BUG=chromium-os:5938

Change-Id: I7ee654d5b429d67d65e9729210ef839c58fa1d34

Review URL: http://codereview.chromium.org/3232004

M SConstruct M utils.cc

Comment #24

Posted on Sep 2, 2010 by Happy Giraffe

Commit: 8566b7bb99446d3bb297eeff65a7e1ca0b59fa95 Email: wad@chromium.org

update_engine: use librootdev

Rewrote BootDevice() to call rootdev() with full resolution enabled. BootDevice() was crawling /proc/cmdline while rootdev() uses /sys. We should have both /proc and /sys normally so hopefully this is a minor change to get us to a working updater over dm-verity.

TEST=none yet. BUG=chromium-os:5938

Change-Id: I7ee654d5b429d67d65e9729210ef839c58fa1d34

Review URL: http://codereview.chromium.org/3232004

M SConstruct M utils.cc

Comment #25

Posted on Sep 28, 2010 by Grumpy Rhino

Build:

Chrome OS : 0.8.72.3 (dev channel official build) Verified fixed AU with the latest dev channel signed images

Comment #26

Posted on Oct 9, 2012 by Quick Rabbit

Commit: 0b8017c3f1a051cbe190fc9ed60aa67b869f0c73 Email: wad@chromium.org

update_engine,rootdev: atomically add librootdev and add update_engine deps

Adds librootdev to /usr/lib and rootdev.h to /usr/include. Makes update_engine RDEP on rootdev.

This will make it safe for the update_engine change to land which uses the new librootdev.

TEST=built both with these ebuilds aqnd cros_workon BUG=chromium-os:5938

Change-Id: Ia2a0e84d171689f1bd0111a4c699930c5764c850

Review URL: http://codereview.chromium.org/3262006

D chromeos-base/update_engine/update_engine-0.0.1-r51.ebuild A chromeos-base/update_engine/update_engine-0.0.1-r52.ebuild M chromeos-base/update_engine/update_engine-9999.ebuild D sys-apps/rootdev/rootdev-0.0.1-r3.ebuild A sys-apps/rootdev/rootdev-0.0.1-r4.ebuild M sys-apps/rootdev/rootdev-9999.ebuild

Comment #27

Posted on Mar 7, 2013 by Grumpy Hippo

(No comment was entered for this change.)

Comment #28

Posted on Mar 10, 2013 by Quick Rabbit

(No comment was entered for this change.)

Comment #29

Posted on Mar 12, 2013 by Happy Horse

Moved to: Issue chromium:187878

Status: Moved

Labels:
Type-Bug Pri-0 Iteration-10 Iteration-11 ReleaseBlock-Dev ForMerge-68.B OS-Chrome M-8 Cr-Internals-Installer Cr-OS-Systems