Skip to main content
deleted 1298 characters in body
Source Link

I have a raspbian lite SD Card Image.

I have expanded the cmdline.txt file by the following line init=/usr/lib/raspi-config/init_resize.sh.

cmdline.txt

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes logo.nologo vt.global_cursor_default=0 rootwait quiet init=/usr/lib/raspi-config/init_resize.sh

On the first boot, I get the blue screen (see picture below) for 1-2 seconds.

"Resized Root filesystem. Restart in 5 seconds." (<- this is the right text; picture is only an example!)

enter image description here

But the filesystem is not expanded!

If I call the script (/usr/lib/raspi-config/init_resize.sh) by myself after boot, I get the following error:

enter image description here

I saw that the /etc/init.d/resizefs_once script and /etc/rc3.d/S01resize2fs_once is missing, which is build by raspi-config (source: http://raspberrypi.stackexchange.com/a/56623/57858).

by posting this thread, I got the answer for my own question. So now here is my solution!

After baking the image, I have mounted the image again and add the /etc/init.d/resizefs_once file

#!/bin/sh
### BEGIN INIT INFO
# Provides:          resize2fs_once
# Required-Start:
# Required-Stop:
# Default-Start: 3
# Default-Stop:
# Short-Description: Resize the root filesystem to fill partition
# Description:
### END INIT INFO

. /lib/lsb/init-functions

case "$1" in
  start)
    log_daemon_msg "Starting resize2fs_once" &&
    resize2fs /dev/mmcblk0p2 &&
    update-rc.d resize2fs_once remove &&
    rm /etc/init.d/resize2fs_once &&
    log_end_msg $?
    ;;
  *)
    echo "Usage: $0 start" >&2
    exit 3
    ;;
esac

and the missing symbolic link: /etc/rc3.d/S01resize2fs_once

sudo ln -s /$PathToMountPoint$/etc/init.d/resize2fs_once /$PathToMountPoint$/etc/rc3.d/S01resize2fs_once

Now everything works!

Hope this manual helps someone else.

I have a raspbian lite SD Card Image.

I have expanded the cmdline.txt file by the following line init=/usr/lib/raspi-config/init_resize.sh.

cmdline.txt

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes logo.nologo vt.global_cursor_default=0 rootwait quiet init=/usr/lib/raspi-config/init_resize.sh

On the first boot, I get the blue screen (see picture below) for 1-2 seconds.

"Resized Root filesystem. Restart in 5 seconds." (<- this is the right text; picture is only an example!)

enter image description here

But the filesystem is not expanded!

If I call the script (/usr/lib/raspi-config/init_resize.sh) by myself after boot, I get the following error:

enter image description here

I saw that the /etc/init.d/resizefs_once script and /etc/rc3.d/S01resize2fs_once is missing, which is build by raspi-config (source: http://raspberrypi.stackexchange.com/a/56623/57858).

by posting this thread, I got the answer for my own question. So now here is my solution!

After baking the image, I have mounted the image again and add the /etc/init.d/resizefs_once file

#!/bin/sh
### BEGIN INIT INFO
# Provides:          resize2fs_once
# Required-Start:
# Required-Stop:
# Default-Start: 3
# Default-Stop:
# Short-Description: Resize the root filesystem to fill partition
# Description:
### END INIT INFO

. /lib/lsb/init-functions

case "$1" in
  start)
    log_daemon_msg "Starting resize2fs_once" &&
    resize2fs /dev/mmcblk0p2 &&
    update-rc.d resize2fs_once remove &&
    rm /etc/init.d/resize2fs_once &&
    log_end_msg $?
    ;;
  *)
    echo "Usage: $0 start" >&2
    exit 3
    ;;
esac

and the missing symbolic link: /etc/rc3.d/S01resize2fs_once

sudo ln -s /$PathToMountPoint$/etc/init.d/resize2fs_once /$PathToMountPoint$/etc/rc3.d/S01resize2fs_once

Now everything works!

Hope this manual helps someone else.

I have a raspbian lite SD Card Image.

I have expanded the cmdline.txt file by the following line init=/usr/lib/raspi-config/init_resize.sh.

cmdline.txt

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes logo.nologo vt.global_cursor_default=0 rootwait quiet init=/usr/lib/raspi-config/init_resize.sh

On the first boot, I get the blue screen (see picture below) for 1-2 seconds.

"Resized Root filesystem. Restart in 5 seconds." (<- this is the right text; picture is only an example!)

enter image description here

But the filesystem is not expanded!

If I call the script (/usr/lib/raspi-config/init_resize.sh) by myself after boot, I get the following error:

enter image description here

Source Link

First Boot expand filesystem does not take effect

I have a raspbian lite SD Card Image.

I have expanded the cmdline.txt file by the following line init=/usr/lib/raspi-config/init_resize.sh.

cmdline.txt

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes logo.nologo vt.global_cursor_default=0 rootwait quiet init=/usr/lib/raspi-config/init_resize.sh

On the first boot, I get the blue screen (see picture below) for 1-2 seconds.

"Resized Root filesystem. Restart in 5 seconds." (<- this is the right text; picture is only an example!)

enter image description here

But the filesystem is not expanded!

If I call the script (/usr/lib/raspi-config/init_resize.sh) by myself after boot, I get the following error:

enter image description here

I saw that the /etc/init.d/resizefs_once script and /etc/rc3.d/S01resize2fs_once is missing, which is build by raspi-config (source: http://raspberrypi.stackexchange.com/a/56623/57858).

by posting this thread, I got the answer for my own question. So now here is my solution!

After baking the image, I have mounted the image again and add the /etc/init.d/resizefs_once file

#!/bin/sh
### BEGIN INIT INFO
# Provides:          resize2fs_once
# Required-Start:
# Required-Stop:
# Default-Start: 3
# Default-Stop:
# Short-Description: Resize the root filesystem to fill partition
# Description:
### END INIT INFO

. /lib/lsb/init-functions

case "$1" in
  start)
    log_daemon_msg "Starting resize2fs_once" &&
    resize2fs /dev/mmcblk0p2 &&
    update-rc.d resize2fs_once remove &&
    rm /etc/init.d/resize2fs_once &&
    log_end_msg $?
    ;;
  *)
    echo "Usage: $0 start" >&2
    exit 3
    ;;
esac

and the missing symbolic link: /etc/rc3.d/S01resize2fs_once

sudo ln -s /$PathToMountPoint$/etc/init.d/resize2fs_once /$PathToMountPoint$/etc/rc3.d/S01resize2fs_once

Now everything works!

Hope this manual helps someone else.