Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Parted can't change partition table
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 564
Location: Switzerland

PostPosted: Fri Mar 20, 2020 5:30 pm    Post subject: [SOLVED] Parted can't change partition table Reply with quote

I want to install gentoo on a new HP pavilion laptop with preinstalled FreeDOS.
I boot the minimal install from a usb stick without problems.

But parted gives me error messages for every action which would change something:
Code:
 livecd ~ # parted -a optimal /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                               
Model:   (scsi)
Disk /dev/sda: 3901MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 2      98.3kB  6689kB  6590kB  primary               esp

(parted) rm 2                                                             
Error: Partition(s) 1 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because
it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.
Ignore/Cancel?                                                           
When i type 'Ignore' then quit parted and reboot, it seems that i can't boot from the usb stick anymore.

With fdisk it is similar: i can do all the commands but after leaving fdiisk with "w" i get this
Code:
Command (m for help): w
The partition table has been altered.
Failed to add partition 1 to system: Device or resource busy
Failed to add partition 2 to system: Device or resource busy
Failed to add partition 3 to system: Device or resource busy

The kernel still uses the old partitions. The new table will be used at the next reboot.
Syncing disks.

How can i 'force' a new partition table?

Thanks


Last edited by jody on Sun Mar 22, 2020 11:07 am; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7653
Location: Saint Amant, Acadiana

PostPosted: Fri Mar 20, 2020 6:07 pm    Post subject: Reply with quote

Disk /dev/sda: 3901MB

What is this, your USB stick? My guess is you are not working on correct block device.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1038
Location: Italy

PostPosted: Fri Mar 20, 2020 6:25 pm    Post subject: Reply with quote

@jody: what's the output of the lsblk command when you boot from the minimal usb stick?
Back to top
View user's profile Send private message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 564
Location: Switzerland

PostPosted: Fri Mar 20, 2020 7:00 pm    Post subject: Reply with quote

the output of lsblk:
Code:
 livecd ~ # lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0         7:0    0 314.7M  1 loop /mnt/livecd
sda           8:0    1   3.6G  0 disk
|-sda1        8:1    1   349M  0 part /mnt/cdrom
`-sda2        8:2    1   6.3M  0 part
nvme0n1     259:0    0   477G  0 disk
|-nvme0n1p1 259:1    0   512M  0 part
|-nvme0n1p2 259:2    0   4.9G  0 part
`-nvme0n1p3 259:3    0   510M  0 part


So it seems that sda is the stick and 'nveme0n1' is the laptop's drives?
Can i then call parted for /dev/nvme0n1?
(why are these called 'nvme0n1' and not sdaXXX?)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 45383
Location: 56N 3W

PostPosted: Fri Mar 20, 2020 7:09 pm    Post subject: Reply with quote

jody,

nvme0n1 is a solid state HDD connected directly to your PCIe bus.
The first device is /dev/nvme0n1, the second /dev/nvme0n2 ...
nvme0n1p1 is partition 1 on nvme0n1.

You can't boot your usb stick because you destroyed its partition table.

As you say, use parted on /dev/nvme0n1.

When you make your kernel, be sure to include nvme support.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jody
Guru
Guru


Joined: 16 Oct 2007
Posts: 564
Location: Switzerland

PostPosted: Sun Mar 22, 2020 11:07 am    Post subject: Reply with quote

Partitioning nvme0n1 worked!
Thanks for your help!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum