You are not logged in.

#1 2023-05-11 08:50:54

worbgge
Member
Registered: 2021-07-18
Posts: 48

error: attempt to read or write outside of partition

I was fixing another issue that I had

Error loading \vmlinuz-linux-zen-linux: not found

which was fixed with going into a liveboot and doing grub-mkconfig and pacman -Syu
but after I had fixed this i got the error in the title, it says that i can press any button to continue but when i do it get stucks loading on my monitor manufacturer name

Offline

#2 2023-05-11 12:47:48

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: error: attempt to read or write outside of partition

which was fixed with going into a liveboot and doing grub-mkconfig and pacman -Syu

Did you do this on chroot with the EFI partition mounted?

Offline

#3 2023-05-11 13:04:12

worbgge
Member
Registered: 2021-07-18
Posts: 48

Re: error: attempt to read or write outside of partition

d_fajardo wrote:

Did you do this on chroot with the EFI partition mounted?

yes i did it in arch-chroot and i mounted both /mnt and /mnt/boot

Offline

#4 2023-05-11 13:06:53

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 1,393

Re: error: attempt to read or write outside of partition

when does it happen? during boot?
try to get system logs/journal.

Last edited by jl2 (2023-05-11 13:07:37)


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Upload longer text output like this

Offline

#5 2023-05-11 13:18:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,344

Re: error: attempt to read or write outside of partition

sudo fdisk -l
lsblk -f

If you're doing that from the live system, mount /mnt and /mnt/boot, but do not chroot into the installed system.

Offline

#6 2023-05-11 13:31:59

worbgge
Member
Registered: 2021-07-18
Posts: 48

Re: error: attempt to read or write outside of partition

jl2 wrote:

when does it happen? during boot?
try to get system logs/journal.

it happens during boot but i don't get to the TTY or anything to access logs

seth wrote:
sudo fdisk -l
lsblk -f
sudo fdisk -l
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WD10EZEX-08W
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 903492D2-4D39-FF4C-90B6-A9869854C328

Device          Start        End    Sectors  Size Type
/dev/sda1  1744689152 1755174911   10485760    5G Linux filesystem
/dev/sda2     1955840 1744687103 1742731264  831G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/sdb: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000DM004-2U91
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: E739CB38-D181-954A-8FA8-0F7F6ED9D4BE

Device     Start        End    Sectors  Size Type
/dev/sdb1   2048 7814037134 7814035087  3.6T Linux filesystem


Disk /dev/sdc: 59.63 GiB, 64023257088 bytes, 125045424 sectors
Disk model: Dogfish SSD 64GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 299E60B8-37EC-E042-9043-C4AD85C79DDC

Device         Start       End   Sectors  Size Type
/dev/sdc1       2048    206847    204800  100M EFI System
/dev/sdc2     206848    239615     32768   16M Microsoft reserved
/dev/sdc3     239616 123940902 123701287   59G Microsoft basic data
/dev/sdc4  123942912 125042687   1099776  537M Windows recovery environment


Disk /dev/sdd: 931.51 GiB, 1000204885504 bytes, 1953525167 sectors
Disk model: Expansion       
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xd30005de

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdd1        2048 1953521663 1953519616 931.5G  7 HPFS/NTFS/exFAT


Disk /dev/sde: 28.67 GiB, 30784094208 bytes, 60125184 sectors
Disk model:  SanDisk 3.2Gen1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4eb74c97

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sde1  *        2048 60059647 60057600 28.6G  7 HPFS/NTFS/exFAT
/dev/sde2       60059648 60125183    65536   32M ef EFI (FAT-12/16/32)


Disk /dev/mapper/ventoy: 810.32 MiB, 849686528 bytes, 1659544 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x2cac8fc9

Device                   Boot   Start     End Sectors  Size Id Type
/dev/mapper/ventoy-part1 *         64 1628159 1628096  795M  0 Empty
/dev/mapper/ventoy-part2      1628160 1658879   30720   15M ef EFI (FAT-12/16/32)


Disk /dev/loop0: 688.47 MiB, 721911808 bytes, 1409984 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
lbslk -f
NAME       FSTYPE   FSVER            LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0      squashfs 4.0                                                                     0   100% /run/archiso/airootfs
sda                                                                                                  
├─sda1     vfat     FAT32                        3762-7651                              99.4G     0% /mnt/boot
└─sda2     ext4     1.0                          58c791fe-d539-42e3-a973-66ce32cf4038  133.6G    80% /mnt
sdb                                                                                                  
└─sdb1     ext4     1.0                          57c2a4f0-e67b-4dd9-8dc5-a5d1ba4ce3f3                
sdc                                                                                                  
├─sdc1     vfat     FAT32                        7810-5497                                           
├─sdc2                                                                                               
├─sdc3     ntfs                                  FA0614F10614B11D                                    
└─sdc4     ntfs                                  740C8B750C8B3162                                    
sdd                                                                                                  
└─sdd1     ntfs                                  5B3E2C6D0A4DB464                                    
sde                                                                                                  
├─sde1     exfat    1.0              Ventoy      1673-87F0                                           
│ └─ventoy iso9660  Joliet Extension ARCH_202303 2023-03-01-12-52-20-00                              
└─sde2     vfat     FAT16            VTOYEFI     B228-8EFB                                           

Offline

#7 2023-05-11 14:01:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,344

Re: error: attempt to read or write outside of partition

sda1 is 5GB but the filesystem is 100GB - otoh sda2 is 831GB, but the FS only ~670
=> did you somehow try to change the partition sizes or resize the filesystems?

Offline

#8 2023-05-11 14:03:55

worbgge
Member
Registered: 2021-07-18
Posts: 48

Re: error: attempt to read or write outside of partition

seth wrote:

sda1 is 5GB but the filesystem is 100GB - otoh sda2 is 831GB, but the FS only ~670
=> did you somehow try to change the partition sizes or resize the filesystems?

yeah i tried to have sda2 have the free space since i accidentally gave sda1 too much space but without having to get rid of any data i didn't know if it was possible, i did this near a year ago now though so IDK if this would be why

Offline

#9 2023-05-11 14:11:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,344

Re: error: attempt to read or write outside of partition

You apparently resized the partitions, but not the filesystem and now something™ wants to write on sda1 outside the partition.
https://archlinux.org/packages/communit … fatresize/
https://wiki.archlinux.org/title/Parted … partitions (for the ext4 partition)

Offline

#10 2023-05-11 14:31:22

worbgge
Member
Registered: 2021-07-18
Posts: 48

Re: error: attempt to read or write outside of partition

seth wrote:

You apparently resized the partitions, but not the filesystem and now something™ wants to write on sda1 outside the partition.
https://archlinux.org/packages/communit … fatresize/
https://wiki.archlinux.org/title/Parted … partitions (for the ext4 partition)

I tried the command

fatresize -s 5G /dev/sda1

but this gave out

fatresize 1.1.0 (20200405)
part(start=1744689152, end=1755174911, length=10485760)
Error: The file system is bigger than the volume!

Offline

#11 2023-05-11 14:34:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,344

Re: error: attempt to read or write outside of partition

Try to fsck it.

Offline

#12 2023-05-11 14:38:51

worbgge
Member
Registered: 2021-07-18
Posts: 48

Re: error: attempt to read or write outside of partition

seth wrote:

Try to fsck it.

sudo fsck /dev/sda1
fsck from util-linux 2.38.1
fsck.fat 4.2 (2021-01-31)
Seek to 106924022272:Invalid argument

Offline

#13 2023-05-11 14:45:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,344

Re: error: attempt to read or write outside of partition

Since sda1 is right of sda2 and stops at sector 1755174911 but the drive has 1953525168 sectors there's a gap of ~95GB
Simply re-grow the fat partition to fill the disk to the end, which will most likely get it in line w/ the filesystem.

Offline

#14 2023-05-11 15:01:18

worbgge
Member
Registered: 2021-07-18
Posts: 48

Re: error: attempt to read or write outside of partition

seth wrote:

Since sda1 is right of sda2 and stops at sector 1755174911 but the drive has 1953525168 sectors there's a gap of ~95GB
Simply re-grow the fat partition to fill the disk to the end, which will most likely get it in line w/ the filesystem.

sorry i'm not 100% sure, do i need to delete the partition in something like fdisk and then create a new one with the full size for /dev/sda2?

Offline

#15 2023-05-11 15:26:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,344

Re: error: attempt to read or write outside of partition

You can also use gparted or cfdisk to resize it.
But yes, recreating the partition will not afffect the filesystem (do NOT run mkfs!)

Offline

#16 2023-05-11 15:47:21

worbgge
Member
Registered: 2021-07-18
Posts: 48

Re: error: attempt to read or write outside of partition

seth wrote:

You can also use gparted or cfdisk to resize it.
But yes, recreating the partition will not afffect the filesystem (do NOT run mkfs!)

should i delete both the sda1 & 2? the 92GB free starts at the end of sda1 and without deleting i can't add it to sda2

Offline

#17 2023-05-11 19:33:16

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,344

Re: error: attempt to read or write outside of partition

DO NOT DELETE THE PARTITIONS!

Resizing the partitions in the way where you shrink sda1 and add the space to sda2 is a more involved process and (given the on-disk order) will require to move the sda1 partition.

BUT: before you do any of that, grow the sda1 partition back to its original size (matching the filesystem)

You'll then have to shrink the FS, then shrink the partition, then move it and then you can grow sda2 and at last the filesystem on sda2
You should use gparted which allows you to do this w/ a GUI frontend and has likely a better chance to not screw this that you doing it manually.

BUT: before you do any of that, grow the sda1 partition back to its original size (matching the filesystem)
AND: if you intend to resize the partitions this way HAVE BACKUPS! People shred their data this way a lot and even though gparted stands a good chance to protect you from that, it's not a 100% chance.

Offline

Board footer

Powered by FluxBB