setup-alpine "Failed to add partition: Invalid argument"

2 posts / 0 new
Last post
#1 Sun, 2016-11-13 08:52
presroi
  • presroi's picture
  • Offline
  • Last seen: 1 year 4 months ago
  • Joined: 2016-11-13

Greetings,

I have been trying to install Alpine Linux (x86-64) 3.4.6 on a Dell Latitude E6510. Booting from CD-ROM works, the alpine-setup command works properly until the hard disk configuration part.

I select the only available disk sda and regardless of how I answer the "How would you like to use it? ('sys', 'data', 'lvm')", the result is

"Initializing partitions on /dev/sda...
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
Failed to add partition: Invalid argument"

where the script aborts.

Is there a verbose mode of the setup-alpine script to identify the argument that is considered invalid?

Kind regards,
Mathias

Sun, 2017-01-01 06:10
pcm1289
  • pcm1289's picture
  • Offline
  • Last seen: 1 year 3 months ago
  • Joined: 2017-01-01

I ran into the same issue. After doing some troubleshooting, I found that it was because I had an existing partitioning scheme on my disk.

You should be able to clear your partitioning scheme using fdisk. The steps I took were
fdisk /dev/sda
o
w
q

I was able to identify where the issue was happening by removing the redirections to /dev/null in /sbin/setup-disk in the setup_partitions() function (which starts on line 495 in version 3.5.0)

--pcm1289

Log in or register to post comments