automatic resizing of partitions in ubuntu boot script makes disk unreadable

613 views
Skip to first unread message

michele

unread,
Apr 14, 2011, 1:53:15 AM4/14/11
to pandaboard
Hi all,
I have a Pandaboard A2. I had some troubles booting Ubuntu from a 8GB
Kingston SD: after booting, Ubuntu resizes both partitions and they
become unreadable. It seems to me that the script jasper_growroot is
responsible. This is what I do:

Just to make sure, I format the disk with a script similar to the one
found here: http://git.openembedded.org/cgit.cgi/openembedded/tree/contrib/angstrom/omap3-mkcard.sh

With the disk unmounted, I follow the instructions on
http://www.omappedia.org/wiki/Ubuntu_flashing and load one of the
nightly builds for omap4 from here: http://cdimage.ubuntu.com/ubuntu-netbook/daily-preinstalled/current/.
(The same result is seen with the stable version.)

After this, I can mount both partitions, the vfat and the ext3
partitions, and read them under Debian. Since I do not have an HDMI
monitor and Ubuntu doesn't display any output on the serial port, I
use this boot.scr.txt
fatload mmc 0:1 0x80000000 uImage
fatload mmc 0:1 0x81600000 uInitrd
setenv bootargs vram=32M mem=460M@0x80000000 mem=256M@0xA0000000 root=/
dev/mmcblk0p2 fixrtc nosplash console=ttyO2,115200n8
bootm 0x80000000 0x81600000
to replace the original one. To be honest, I am not sure what this
does; I found it here http://www.omappedia.com/wiki/PandaBoard_FAQ#How_do_I_saveenv_for_boot_args_on_a_PandaBoard.3F.
I use mkimage -A arm -T script -O linux -C none -a 0 -e 0 -n
"boot.scr" -d boot.scr.txt boot.scr and then I copy boot.scr to the
boot partition.

Booting happens with these errors:

omap_i2c omap_i2c.3: controller timed out but this seems to be
irrelevant and some time later

Begin: Loading essential drivers ... [ 18.706451] Btrfs loaded
done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-
top ... done.
Begin: Running /scripts/local-premount ... Caching vfat content in /
dev/.initramfs/jasper-vfat ...
Resizing root partition ...
[ 20.175292] mmcblk0: p1 p2
Re-writing vfat partition ...
Resizing root filesystem. Please wait, this will take a moment ...
Resizing root filesystem ...
[ 24.775054] EXT3-fs: barriers not enabled
[ 24.780426] kjournald starting. Commit interval 5 seconds
[ 24.793029] EXT3-fs (mmcblk0p2): using internal journal
[ 24.798736] EXT3-fs (mmcblk0p2): mounted filesystem with writeback
data mode
Checking filesystem before resizing...
Resizing, please wait...
Resizing, pass: 1 [ 2/100]Resizing, pass: 1 [ 5/100]Resizing, pass:
1 [ 8/100]Resizing, pass: 1 [ 10/100]Resizing, pass: 1 [ 12/100]
[ 54.490356] mmcblk0: error -110 transferring data, sector 6699449,
nr 928, card status 0xc00
[ 54.499450] end_request: I/O error, dev mmcblk0, sector 6699449
[ 54.505676] Buffer I/O error on device mmcblk0p2, logical block
3277432

After a long list of something similar to "end_request: I/O error, dev
mmcblk0, sector 6699469", Ubuntu reboots and then stops with this
message
Target filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg.

I couldn't find anything in the mailing list about this behaviour so I
thought I could ask

I have the full output of the serial port if anybody is interested.

Thanks,
michele

Dechesne, Nicolas

unread,
Apr 14, 2011, 3:19:38 AM4/14/11
to panda...@googlegroups.com, michele
On Thu, Apr 14, 2011 at 7:53 AM, michele <michele....@gmail.com> wrote:
I have a Pandaboard A2. I had some troubles booting Ubuntu from a 8GB
Kingston SD: after booting, Ubuntu resizes both partitions and they
become unreadable. It seems to me that the script jasper_growroot is
responsible. This is what I do:

Just to make sure, I format the disk with a script similar to the one
found here: http://git.openembedded.org/cgit.cgi/openembedded/tree/contrib/angstrom/omap3-mkcard.sh

this is not needed. since the 'flashing step' later will erase the partition table anyways.


With the disk unmounted, I follow the instructions on
http://www.omappedia.org/wiki/Ubuntu_flashing and load one of the
nightly builds for omap4 from here: http://cdimage.ubuntu.com/ubuntu-netbook/daily-preinstalled/current/.
(The same result is seen with the stable version.)

After this, I can mount both partitions, the vfat and the ext3
partitions, and read them under Debian. Since I do not have an HDMI
monitor and Ubuntu doesn't display any output on the serial port, I
use this boot.scr.txt
fatload mmc 0:1 0x80000000 uImage
fatload mmc 0:1 0x81600000 uInitrd
setenv bootargs vram=32M mem=460M@0x80000000 mem=256M@0xA0000000 root=/
dev/mmcblk0p2 fixrtc nosplash console=ttyO2,115200n8
bootm 0x80000000 0x81600000
to replace the original one. To be honest, I am not sure what this
does; I found it here http://www.omappedia.com/wiki/PandaBoard_FAQ#How_do_I_saveenv_for_boot_args_on_a_PandaBoard.3F.
I use mkimage -A arm -T script -O linux -C none -a 0 -e 0 -n
"boot.scr" -d boot.scr.txt boot.scr and then I copy boot.scr to the
boot partition.

well, this is not supposed to work. i mean you cannot install Ubuntu Desktop image with no display connected. there is quite a big of magic coded in the boot.scr and initramfs to make a proper install. i never tried what you did, and i can't explain why it's failing this way, but anyways you will not get a proper install without monitor.

in natty we have added 'headless' pre installed images. the images are using same principles as the standard image, but they contain no UI, however they can be installed from the serial console. see https://wiki.ubuntu.com/ARM/OMAPHeadlessInstall

once you have a headless install up and running, you can always install the full desktop with apt-get install ubuntu-desktop later (e.g. when you get a monitor!)

michele

unread,
Apr 14, 2011, 4:16:33 PM4/14/11
to pandaboard
Thanks. I hate to be a bad sport, but still it does not work.

> in natty we have added 'headless' pre installed images. the images are using
> same principles as the standard image, but they contain no UI, however they
> can be installed from the serial console. seehttps://wiki.ubuntu.com/ARM/OMAPHeadlessInstall
>
> once you have a headless install up and running, you can always install the
> full desktop with apt-get install ubuntu-desktop later (e.g. when you get a
> monitor!)

Using ubuntu-headless-11.04-beta2-preinstalled-headless-armel
+omap4.img.gz and following the instructions in the link you sent, the
result is a corrupted filesystem:

tCaching vfat content in /dev/.initramfs/jasper-vfat ...
Resizing root partition ...
[ 25.243896] journal commit I/O error
Enabling serial console login
cp: can't create '/root/etc/init/serial.conf': Read-only file system
fsck from util-linux-ng 2.17.2
/dev/mmcblk0p2: recovering journal
/dev/mmcblk0p2: clean, 44941/192384 files, 280674/384715 blocks
[ 26.195007] EXT3-fs (mmcblk0p2): error: ext3_remount: Abort forced
by user
mount: cannot remount block device /dev/mmcblk0p2 read-write, is write-
protected
An error occurred while mounting /

<snip>
> image with no display connected. there is quite a big of magic coded in the
> boot.scr and initramfs to make a proper install. i never tried what you did,

The content of boot.scr.txt is the same as I could read from the
official ubuntu image. Since the official headless image also fails, I
thought that no more harm could result if I did the same using instead
for boot.scr.txt the following:
fatload mmc 0:1 0x80000000 uImage
fatload mmc 0:1 0x81600000 uInitrd
setenv bootargs vram=32M mem=456M@0x80000000 mem=512M@0xA0000000 root=/
dev/mmcblk0p2 fixrtc nosplash debian-installer/framebuffer=false
console=ttyO2,115200n8
bootm 0x80000000 0x81600000

And this is where it begins to go wrong:
Resizing, pass: 1 [100/100]
[ 114.341857] journal commit I/O error
Enabling serial console login
cp: can't create '/root/etc/init/serial.conf': Read-only file system
fsck from util-linux-ng 2.17.2
/dev/mmcblk0p2: recovering journal
/dev/mmcblk0p2: clean, 44941/945888 files, 328147/1923783 blocks
[ 115.516113] EXT3-fs (mmcblk0p2): error: ext3_remount: Abort forced
by user

michele

unread,
Apr 14, 2011, 4:29:04 PM4/14/11
to pandaboard
Ah, it woks with a 4GB SD card.

michele

unread,
Apr 15, 2011, 1:56:31 AM4/15/11
to pandaboard
By the way, all images (headless, stable and nightly build) work when
booting from the 4GB Kingston card. Of course I don't see any video
output since I have no HDVI monitor but the filesystem resizing does
not corrupt the filesystem.

On Apr 14, 10:29 pm, michele <michele.zaffa...@gmail.com> wrote:
> Ah, it works with a 4GB SD card.

cb88

unread,
May 19, 2011, 10:40:08 AM5/19/11
to pandaboard
I'm having this very same issue. I have a 16Gb and 8Gb card and it
happens on both.

Hopefully the solution isn't to just get a smaller card :-/ There is a
possibility that my root= parameter isn't correct after the resize but
I suspect it is this same issue.

GrueMaster

unread,
May 19, 2011, 3:28:28 PM5/19/11
to pandaboard
Try using the released images instead of the beta or daily images.
They are at http://cdimage.ubuntu.com/releases/11.04/release/ubuntu-11.04-preinstalled-headless-armel+omap4.img.gz
(headless)

And http://cdimage.ubuntu.com/releases/11.04/release/ubuntu-11.04-preinstalled-netbook-armel+omap4.img.gz
for netbook (with monitor)

Also, follow the instructions for flashing from https://wiki.ubuntu.com/ARM/OMAP.

I have tested these images fairly thoroughly on 2 different pandas
with 4, 8, and 16 gig SD cards.

Cheers,

Tobin Davis

cb88

unread,
May 27, 2011, 10:18:39 PM5/27/11
to pandaboard
I have tried the daily images as well as the released natty headless
image which does this same thing.. it says there is a buffer io error
just like the OPs I am going to try a few more images and then
probably try a smaller card and see how that goes.

Thanks,
cb88/Chase

On May 19, 3:28 pm, GrueMaster <gruemas...@gmail.com> wrote:
> Try using the released images instead of the beta or daily images.
> They are athttp://cdimage.ubuntu.com/releases/11.04/release/ubuntu-11.04-preinst...
> (headless)
>
> Andhttp://cdimage.ubuntu.com/releases/11.04/release/ubuntu-11.04-preinst...
> for netbook (with monitor)
>
> Also, follow the instructions for flashing fromhttps://wiki.ubuntu.com/ARM/OMAP.

Milky

unread,
May 29, 2011, 9:32:27 PM5/29/11
to pandaboard
When I had this problem, I solved it by using a 2GB card with the
Natty Headless image... Using the 2GB card means that the image
doesn't have to resize itself :P

That's the safe bet at this point in time, as it seems that there's a
lot of variation between SD cards.

mscdex

unread,
May 30, 2011, 1:40:00 AM5/30/11
to pandaboard
FWIW I have a 32gb card that I installed 11.04 onto tonight and it
went without a hitch.

Milky

unread,
May 31, 2011, 2:00:35 AM5/31/11
to pandaboard
So far... on a Pandaboard Rev A2... I've tried a Class 10 Kingston
16GB SDHC card, a Class 4 Kingston 4GB MicroSD card and a generic
Samsung 2GB MicroSD card.
All fail but the Samsung 2GB MicroSD card (since it doesn't have to
resize partitions).
I could try it on an 8GB MicroSD card, but I reckon I could tell you
the outcome before it even happens.

I've posted my problem here... http://groups.google.com/group/pandaboard/browse_thread/thread/c2287d603dc325e0
But as Michele said, it's the exact same problem as the one she posted
here.

mscdex, do you by any chance have a Rev A2 board?

mscdex

unread,
May 31, 2011, 2:56:38 AM5/31/11
to pandaboard
On May 31, 2:00 am, Milky <akava...@gmail.com> wrote:
> mscdex, do you by any chance have a Rev A2 board?

Yes, and the card specifically is a Sandisk Ultra II Class 4 32gb.

mag...@googlemail.com

unread,
May 31, 2011, 6:57:34 PM5/31/11
to pandaboard
I've got the same issue with the message:
"No init found. Try passing init= bootarg."

I also tried the Ubuntu 11.04 release version (ubuntu-11.04-
preinstalled-netbook-armel+omap4.img.gz).
My Pandaboard is an Rev A1 and the SD-Card in question is a Transcend
16 GB Class 10.
I've got another Transcend 8 GB Class 10 where my Ubuntu 10.10 version
is installed which I haven't yet tried to fill with 11.04 (have to
make a backup of the card first).

I hope a fixed release won't take weeks to get.

mag...@googlemail.com

unread,
Jun 2, 2011, 12:33:48 PM6/2/11
to pandaboard
Hi,
a little update to the "no init found" problem.

On 1 Jun., 00:57, "mago...@googlemail.com" <mago...@googlemail.com>
wrote:
> I've got another Transcend 8 GB Class 10 where my Ubuntu 10.10 version
> is installed which I haven't yet tried to fill with 11.04 (have to
> make a backup of the card first).

Ok, I did the backup using DFSee copied the Image to the 16 GB SD-Card
and tried a fresh 11.04 installation on the now empty 8 GB SD-Card.
What can I say.....it worked.
Now I create a new Image of the current installation on the 8 GB card
and move that to the 16 GB card.
When it runs I try to increase the volume size to the maximum size of
~16 GB and hope the installation still works after that.
Reply all
Reply to author
Forward
0 new messages