Mounting Ubi image fails cannot attach “/dev/mtd0”

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have an antminerr firmware, which have a rootfs.jffs2 image, according to script inside the firmware, this image is actually and ubi image, i wanted to mount it add some files and rebuild this image again.



So what i did, i followed the guide here:



https://pjankows.blogspot.com/2012/01/how-to-mount-ubi-image.html



root@debian:~/1/xilinx# flash_erase /dev/mtd0 0 0
Erasing 128 Kibyte @ 1ffe0000 -- 100 % complete
root@debian:~/1/xilinx# ubiformat /dev/mtd0 -f rootfs.jffs2
ubiformat: mtd0 (nand), size 536870912 bytes (512.0 MiB), 4096 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 4095 -- 100 % complete
ubiformat: 4096 eraseblocks are supposedly empty
ubiformat: flashing eraseblock 371 -- 100 % complete
ubiformat: formatting eraseblock 4095 -- 100 % complete
root@debian:~/1/xilinx# modprobe ubi
root@debian:~/1/xilinx# ubiattach -p /dev/mtd0
ubiattach: error!: cannot attach "/dev/mtd0"
error 22 (Invalid argument)


So i get this error for some reason ubiattach: error!: cannot attach "/dev/mtd0"



Can someone help? My os is debian 9



I have alsoo lokkedup ls /dev/ there is no special device of ubi, like /dev/ubi /dev/ubi0_0 do i need to install something to get those device created?







share|improve this question





















  • Check: linux-mtd.infradead.org/faq/ubi.html might help
    – Ravi
    Jul 6 at 10:41














up vote
0
down vote

favorite












I have an antminerr firmware, which have a rootfs.jffs2 image, according to script inside the firmware, this image is actually and ubi image, i wanted to mount it add some files and rebuild this image again.



So what i did, i followed the guide here:



https://pjankows.blogspot.com/2012/01/how-to-mount-ubi-image.html



root@debian:~/1/xilinx# flash_erase /dev/mtd0 0 0
Erasing 128 Kibyte @ 1ffe0000 -- 100 % complete
root@debian:~/1/xilinx# ubiformat /dev/mtd0 -f rootfs.jffs2
ubiformat: mtd0 (nand), size 536870912 bytes (512.0 MiB), 4096 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 4095 -- 100 % complete
ubiformat: 4096 eraseblocks are supposedly empty
ubiformat: flashing eraseblock 371 -- 100 % complete
ubiformat: formatting eraseblock 4095 -- 100 % complete
root@debian:~/1/xilinx# modprobe ubi
root@debian:~/1/xilinx# ubiattach -p /dev/mtd0
ubiattach: error!: cannot attach "/dev/mtd0"
error 22 (Invalid argument)


So i get this error for some reason ubiattach: error!: cannot attach "/dev/mtd0"



Can someone help? My os is debian 9



I have alsoo lokkedup ls /dev/ there is no special device of ubi, like /dev/ubi /dev/ubi0_0 do i need to install something to get those device created?







share|improve this question





















  • Check: linux-mtd.infradead.org/faq/ubi.html might help
    – Ravi
    Jul 6 at 10:41












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have an antminerr firmware, which have a rootfs.jffs2 image, according to script inside the firmware, this image is actually and ubi image, i wanted to mount it add some files and rebuild this image again.



So what i did, i followed the guide here:



https://pjankows.blogspot.com/2012/01/how-to-mount-ubi-image.html



root@debian:~/1/xilinx# flash_erase /dev/mtd0 0 0
Erasing 128 Kibyte @ 1ffe0000 -- 100 % complete
root@debian:~/1/xilinx# ubiformat /dev/mtd0 -f rootfs.jffs2
ubiformat: mtd0 (nand), size 536870912 bytes (512.0 MiB), 4096 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 4095 -- 100 % complete
ubiformat: 4096 eraseblocks are supposedly empty
ubiformat: flashing eraseblock 371 -- 100 % complete
ubiformat: formatting eraseblock 4095 -- 100 % complete
root@debian:~/1/xilinx# modprobe ubi
root@debian:~/1/xilinx# ubiattach -p /dev/mtd0
ubiattach: error!: cannot attach "/dev/mtd0"
error 22 (Invalid argument)


So i get this error for some reason ubiattach: error!: cannot attach "/dev/mtd0"



Can someone help? My os is debian 9



I have alsoo lokkedup ls /dev/ there is no special device of ubi, like /dev/ubi /dev/ubi0_0 do i need to install something to get those device created?







share|improve this question













I have an antminerr firmware, which have a rootfs.jffs2 image, according to script inside the firmware, this image is actually and ubi image, i wanted to mount it add some files and rebuild this image again.



So what i did, i followed the guide here:



https://pjankows.blogspot.com/2012/01/how-to-mount-ubi-image.html



root@debian:~/1/xilinx# flash_erase /dev/mtd0 0 0
Erasing 128 Kibyte @ 1ffe0000 -- 100 % complete
root@debian:~/1/xilinx# ubiformat /dev/mtd0 -f rootfs.jffs2
ubiformat: mtd0 (nand), size 536870912 bytes (512.0 MiB), 4096 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 4095 -- 100 % complete
ubiformat: 4096 eraseblocks are supposedly empty
ubiformat: flashing eraseblock 371 -- 100 % complete
ubiformat: formatting eraseblock 4095 -- 100 % complete
root@debian:~/1/xilinx# modprobe ubi
root@debian:~/1/xilinx# ubiattach -p /dev/mtd0
ubiattach: error!: cannot attach "/dev/mtd0"
error 22 (Invalid argument)


So i get this error for some reason ubiattach: error!: cannot attach "/dev/mtd0"



Can someone help? My os is debian 9



I have alsoo lokkedup ls /dev/ there is no special device of ubi, like /dev/ubi /dev/ubi0_0 do i need to install something to get those device created?









share|improve this question












share|improve this question




share|improve this question








edited Jul 5 at 10:54
























asked Jul 5 at 10:20









user298327

11




11











  • Check: linux-mtd.infradead.org/faq/ubi.html might help
    – Ravi
    Jul 6 at 10:41
















  • Check: linux-mtd.infradead.org/faq/ubi.html might help
    – Ravi
    Jul 6 at 10:41















Check: linux-mtd.infradead.org/faq/ubi.html might help
– Ravi
Jul 6 at 10:41




Check: linux-mtd.infradead.org/faq/ubi.html might help
– Ravi
Jul 6 at 10:41















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453577%2fmounting-ubi-image-fails-cannot-attach-dev-mtd0%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453577%2fmounting-ubi-image-fails-cannot-attach-dev-mtd0%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)