Hirdetés
- Fejhallgató erősítő és DAC topik
- Milyen belső merevlemezt vegyek?
- Notebook / laptop alkatrészek cseréje (processzor, RAM, HDD)
- Milyen billentyűzetet vegyek?
- Sok hűhó négyszázért: AMD Ryzen 7 9850X3D
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
- AMD APU (AM4 és AM5) topik
- Dobozcserére kárhoztatja asztali csúcs-CPU-ját az Intel
- Gaming notebook topik
- Hobby elektronika
Új hozzászólás Aktív témák
-
CPT.Pirk
Jómunkásember
Ez előzőleg linkelt script ezen részében találtok valami hibát?
echo "This script can initialize the destination disk with a partition"
echo "structure copied from the currently booted filesytem and then resize"
echo "partition 2 (the root filesystem) to use all space on the SD card."
echo -n "Do you want to initialize the destination /dev/$DST_DISK? (yes/no): "
read resp
if [ "$resp" = "y" ] || [ "$resp" = "yes" ]
then
# Image onto the destination disk a beginning fragment of the
# running SD card file structure that spans at least more than
# the start of partition 2.
#
# Calculate the start of partition 2 in MB for the dd.
PART2_START=$(parted /dev/mmcblk0 -ms unit MB p | grep "^2" \
| cut -f 2 -d: | sed s/MB// | cut -f 1 -d.)
# and add some slop
DD_COUNT=`expr $PART2_START + 8`
echo ""
echo "Imaging the partition structure, copying $DD_COUNT megabytes..."
dd if=/dev/mmcblk0 of=/dev/$DST_DISK bs=1M count=$DD_COUNT
# But, though Partion 1 is now imaged, partition 2 is incomplete and
# maybe the wrong size for the destination SD card. So fdisk it to
# make it fill the rest of the disk and mkfs it to clean it out.
#
echo "Sizing partition 2 (root partition) to use all SD card space..."
expand_rootfs
mkfs.ext4 $DST_ROOT_PARTITION > /dev/null
echo ""
echo "/dev/$DST_DISK is initialized and resized. Its partitions are:"
# fdisk -l /dev/$DST_DISK | grep $DST_DISK
parted /dev/$DST_DISK unit MB p \
| sed "/^Model/d ; /^Sector/d"
SRC_ROOT_VOL_NAME=`e2label /dev/mmcblk0p2`
echo ""
echo "Your booted /dev/mmcblk0p2 rootfs existing label: $SRC_ROOT_VOL_NAME"
echo -n "You may enter a label for the destination rootfs $DST_ROOT_PARTITION: "
read resp
if [ "$resp" != "" ]
then
e2label $DST_ROOT_PARTITION $resp
fi
else
echo -e "Aborting\n"
exit 0
fi
fiLényegében az van, hogy az első FAT partíció és annak a tartalma létrejön, felmásolódik, de mikor a második partíciót kellene létrehozni, akkor az fdisk közli, hogy nem tud hozzáférni a /dev/sda -hoz (ez az sd kártya), valamint az mkfs is közli, hogy nem tudja megcsinálni.
szerk: 199. sortól a scriptben.
Új hozzászólás Aktív témák
- Fejhallgató erősítő és DAC topik
- Víz- gáz- és fűtésszerelés
- Milyen belső merevlemezt vegyek?
- Honor Magic8 Pro - bevált recept kölcsönvett hozzávalókkal
- Autós topik látogatók beszélgetős, offolós topikja
- Entware topik
- Notebook / laptop alkatrészek cseréje (processzor, RAM, HDD)
- Két népszerű Sennheiser kapott USB-C csatlakozást
- Gumi és felni topik
- BestBuy topik
- További aktív témák...
- Bitdefender Total Security 3év/3eszköz! - Tökéletes védelem.
- Kaspersky, BitDefender, Avast és egyéb vírusírtó licencek a legolcsóbban, egyenesen a gyártóktól!
- Windows, Office licencek kedvező áron, egyenesen a Microsoft-tól - Automata kézbesítés utalással is!
- PC Game Pass előfizetés
- Windows 10/11 Home/Pro , Office 2024 kulcsok
- AZONNAL KÉSZLETRŐL! Intel Core i5 14600K 32GB 6000MHz RAM 2TB Gen4 SSD RTX 5060 8GB FSP 750W
- iPhone 13 Pro 128GB 100%(1év Garancia)
- BESZÁMÍTÁS! MSI B650 R5 7600 32GB DDR5 512GB SSD RX 9070 XT 16GB Zalman Z10 Plus Seasonic 750W
- GYÖNYÖRŰ iPhone 14 128GB Midnight -1 ÉV GARANCIA - Kártyafüggetlen, MS3967
- Samsung Galaxy A33 5G / 6/128GB / Kártyafüggetlen / 12Hó Garancia /
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest


